Commit 266dc32e authored by's avatar
Browse files

Test separate compilation with indexed types

parent b504085d
{-# OPTIONS -findexed-types #-}
module Ind2_help where
class C a where
data T a :: *
unT :: T a -> a
mkT :: a -> T a
instance (C a, C b) => C (a,b) where
data T (a,b) = TProd (T a) (T b)
unT (TProd x y) = (unT x, unT y)
mkT (x,y) = TProd (mkT x) (mkT y)
test('ind1', normal, compile, [''])
test('ind1', normal, compile, [''])
test('ind2', normal, multimod_compile, ['ind2', '-v0'])
clean(['Ind2_help.hi', 'Ind2_help.o'])
{-# OPTIONS -findexed-types #-}
module ShouldCompile where
import Ind2_help(C(..))
zipT :: (C a, C b) => T a -> T b -> T (a,b)
zipT x y = mkT (unT x, unT y)
Markdown is supported
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