on master help sign in
Output multiple specialize pragmas in a row nicer

We should not insert newlines between them.

commit656d0369d436c3a1d62c0f91c305bef58011d2a1 authormrkkrp <mark.karpov@tweag.io> dateMon 10 Jun 2019, 21:29 (7 years ago) parente98df37
3 files changed+3
data/examples/declaration/signature/specialize/specialize-out.hs+1 data/examples/declaration/signature/specialize/specialize.hs+1 src/Ormolu/Printer/Meat/Module.hs+1
data/examples/declaration/signature/specialize/specialize-out.hs+1
@@ -1,6 +1,7 @@
11foo :: Num a => a -> a
22foo = id
33{-# SPECIALIZE foo :: Int -> Int #-}
4+{-# SPECIALIZE foo :: Float -> Float #-}
45
56{-# SPECIALIZE [2] bar :: Int -> Int #-}
67bar :: Num a => a -> a
data/examples/declaration/signature/specialize/specialize.hs+1
@@ -2,6 +2,7 @@ foo :: Num a => a -> a
22foo = id
33
44{-# SPECIALIZE foo :: Int -> Int #-}
5+{-# SPECIALIZE foo :: Float -> Float #-}
56
67{-# SPECIALIZE [2] bar :: Int -> Int #-}
78
src/Ormolu/Printer/Meat/Module.hs+1
@@ -70,6 +70,7 @@ separatedDecls (FunctionBody n) (InlinePragma n') = n /= n'
7070separatedDecls (InlinePragma n) (TypeSignature n') = n /= n'
7171separatedDecls (FunctionBody n) (SpecializePragma n') = n /= n'
7272separatedDecls (SpecializePragma n) (TypeSignature n') = n /= n'
73+separatedDecls (SpecializePragma n) (SpecializePragma n') = n /= n'
7374separatedDecls _ _ = True
7475
7576pattern TypeSignature