Fix NOINLINE pragma layouting

pull/123/merge
Lennart Spitzner 2018-02-19 17:17:39 +01:00
parent 34036cbb74
commit c124336738
2 changed files with 6 additions and 1 deletions

View File

@ -287,6 +287,10 @@ func = f
{-# INLINE CONLIKE [1] f #-}
f = id
#test noinline pragma 1
{-# NOINLINE func #-}
func :: Int
#test inline pragma 4
#pending this does not work with the compiler version we currently use yet (i think). should work with ghc-8.0.2.
func = f

View File

@ -94,7 +94,8 @@ layoutSig lsig@(L _loc sig) = case sig of
NoInline -> "NOINLINE "
EmptyInlineSpec -> "" -- i have no idea if this is correct.
let phaseStr = case phaseAct of
NeverActive -> "[] "
NeverActive -> "" -- not [] - for NOINLINE NeverActive is
-- in fact the default
AlwaysActive -> ""
ActiveBefore _ i -> "[~" ++ show i ++ "] "
ActiveAfter _ i -> "[" ++ show i ++ "] "