Commit fc898b0c authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add a test for trac #4444

parent e53cf244
-- #4444: We shouldn't warn about SPECIALISE INLINE pragmas on
-- non-overloaded functions
{-# LANGUAGE GADTs, MagicHash #-}
module Q where
import GHC.Exts
data Arr e where
ArrInt :: !Int -> ByteArray# -> Arr Int
ArrPair :: !Int -> Arr e1 -> Arr e2 -> Arr (e1, e2)
(!:) :: Arr e -> Int -> e
{-# SPECIALISE INLINE (!:) :: Arr Int -> Int -> Int #-}
{-# SPECIALISE INLINE (!:) :: Arr (a, b) -> Int -> (a, b) #-}
(ArrInt _ ba) !: (I# i) = I# (indexIntArray# ba i)
(ArrPair _ a1 a2) !: i = (a1 !: i, a2 !: i)
...@@ -330,4 +330,5 @@ test('T4401', normal, compile, ['']) ...@@ -330,4 +330,5 @@ test('T4401', normal, compile, [''])
test('T4404', expect_broken(4404), compile, ['-Wall']) test('T4404', expect_broken(4404), compile, ['-Wall'])
test('HasKey', normal, compile, ['']) test('HasKey', normal, compile, [''])
test('T4418', normal, compile, ['']) test('T4418', normal, compile, [''])
test('T4444', normal, compile, [''])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment