testsuite: Assert that testsuite ways are known
[ghc.git] / testsuite / tests / typecheck / should_compile / T4444.hs
1
2 -- #4444: We shouldn't warn about SPECIALISE INLINE pragmas on
3 -- non-overloaded functions
4
5 {-# LANGUAGE GADTs, MagicHash #-}
6 module Q where
7
8 import GHC.Exts
9
10 data Arr e where
11 ArrInt :: !Int -> ByteArray# -> Arr Int
12 ArrPair :: !Int -> Arr e1 -> Arr e2 -> Arr (e1, e2)
13
14 (!:) :: Arr e -> Int -> e
15 {-# SPECIALISE INLINE (!:) :: Arr Int -> Int -> Int #-}
16 {-# SPECIALISE INLINE (!:) :: Arr (a, b) -> Int -> (a, b) #-}
17 (ArrInt _ ba) !: (I# i) = I# (indexIntArray# ba i)
18 (ArrPair _ a1 a2) !: i = (a1 !: i, a2 !: i)