diff options
Diffstat (limited to 'testsuite/tests/linear/should_compile/Dollar2.hs')
-rw-r--r-- | testsuite/tests/linear/should_compile/Dollar2.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/linear/should_compile/Dollar2.hs b/testsuite/tests/linear/should_compile/Dollar2.hs new file mode 100644 index 0000000000..4cde3dcb45 --- /dev/null +++ b/testsuite/tests/linear/should_compile/Dollar2.hs @@ -0,0 +1,21 @@ +{-# LANGUAGE LinearTypes #-} +{-# LANGUAGE NoImplicitPrelude #-} +module Dollar2 where +{- +inplace/bin/ghc-stage1 -O2 -dcore-lint +-} + + +import GHC.Base + +data AB = A () | B () + +qux :: Bool +qux = True +{-# NOINLINE qux #-} + +foo = id $ ((if qux then A else B) $ ()) + +{- + +-} |