lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
690 stars 72 forks source link

Module declaration is being mixed with pragmas #275

Closed Munksgaard closed 4 years ago

Munksgaard commented 4 years ago

Using brittany master on https://hexagoxel.de/brittany/ the following code

{-# LANGUAGE QuasiQuotes #-}

module Main where

main :: IO ()
main = putStrLn "Hello world"

is turned into

{-# LANGUAGE QuasiQuotes #-}module Main where

main :: IO ()
main = putStrLn "Hello world"

If I use Brittany 0.12.1.1 it seems to work, although the mangled version above is turned into

{-# LANGUAGE QuasiQuotes #-}
                            module Main where

main :: IO ()
main = putStrLn "Hello world"

which is still strange, but better :-)

Thank you for your work on Brittany!

lspitzner commented 4 years ago

Thanks for the report. This is fixed on master; I have triggered a deploy of current master to the web interface. Will take a few minutes. Unless something breaks about my scripting :p

Munksgaard commented 4 years ago

Thanks for the quick response! However, I still seem to be getting the same formatting issue on https://hexagoxel.de/brittany/, but perhaps that is only updated once in a while?

lspitzner commented 4 years ago

whoops, yeah, I had messed up and it only deployed for GHCs 8.0,8.2,8.4. Fixed; According to my tests it is working properly now.

Munksgaard commented 4 years ago

Great, thank you!