profile
viewpoint

Ask questionsDISABLED ormolu remove empty lines

Describe the bug I expect that ORMOLU_DISABLE can fully disable ormolu, but it continues removing empty lines.

To Reproduce Input file:

{- ORMOLU_DISABLE -}

module Foo (foo,bar) where



foo :: Int -> Int
foo = (+5)



bar :: Bool -> Bool
bar True  = True
bar False = True

Output file:

{- ORMOLU_DISABLE -}

module Foo (foo,bar) where

foo :: Int -> Int
foo = (+5)

bar :: Bool -> Bool
bar True  = True
bar False = True

Expected behavior Output source code should be identical to the input if I put {- ORMOLU_DISABLE -} at a file start.

{- ORMOLU_DISABLE -}

module Foo (foo,bar) where



foo :: Int -> Int
foo = (+5)



bar :: Bool -> Bool
bar True  = True
bar False = True

Environment

  • OS name + version: MacOS X 11.0.1
  • Version of the code: ormolu 0.1.4.1
tweag/ormolu

Answer questions kukimik

I expect that ORMOLU_DISABLE can fully disable ormolu, but it continues removing empty lines.

@ryukzak Note that there is an exception regarding the indentation level in the regions where formatting is disabled. See #601.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List