Lower precedence for {-# UNPACK #-}
[ghc.git] / testsuite / tests / typecheck / should_compile / T14761c.hs
1 {-# LANGUAGE StrictData, TypeOperators, GADTs #-}
2 {-# LANGUAGE StrictData #-}
3
4 -- Enable -Werror to fail in case we get this warning:
5 --
6 -- UNPACK pragma lacks '!' on the first argument of ‘A’
7 --
8 -- In this test case we expect not to get this warning and succeed
9 -- because of -XStrictData, see T14761a for the opposite.
10 {-# OPTIONS -Werror #-}
11
12 module T14761c where
13
14 data A = A { a :: {-# UNPACK #-} Maybe Int }
15
16 data x && y = Pair x y
17
18 data B = B { b :: {-# UNPACK #-} Maybe Int && [] Char && Int }
19
20 data G where
21 MkG2 :: {-# UNPACK #-} Maybe Int && [] Char && Int -> G