-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
commentsIssues related to comment placementIssues related to comment placementstyleNitpicking and things related to purely visual aspect for formatting.Nitpicking and things related to purely visual aspect for formatting.
Description
Describe the bug
Every non haddock comments that appears before a OPTIONS_GHC pragma get pushed to the very top.
To Reproduce
module Plugin.Data.Spec where
{-
foo bar boz
-}
monoConstructor :: CompiledCode (Integer -> Integer -> MyMonoData)
monoConstructor = plc (Proxy @"monoConstructor") Mono1
-- hello world
-- | A type of rose trees with empty leaves.
data EmptyRose = EmptyRose [EmptyRose]
-- This seems to cause issue
{-# OPTIONS_GHC -Wno-incomplete-patterns #-}
-- bob alice eve
f :: ()
f = ()formats to
{-
foo bar boz
-}
-- hello world
-- This seems to cause issue
{-# OPTIONS_GHC -Wno-incomplete-patterns #-}
module Plugin.Data.Spec where
monoConstructor :: CompiledCode (Integer -> Integer -> MyMonoData)
monoConstructor = plc (Proxy @"monoConstructor") Mono1
-- | A type of rose trees with empty leaves.
data EmptyRose = EmptyRose [EmptyRose]
-- bob alice eve
f :: ()
f = ()Expected behavior
Location of the comments should be respected regardless of the presence of OPTIONS_GHC pragma
Environment
Used web application at https://ormolu-live.tweag.io/
Metadata
Metadata
Assignees
Labels
commentsIssues related to comment placementIssues related to comment placementstyleNitpicking and things related to purely visual aspect for formatting.Nitpicking and things related to purely visual aspect for formatting.