Commit 7b73a751 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Add a test for SpecConstr + GADTs

parent c732ea2f
......@@ -14,6 +14,7 @@ test('simpl010', normal, compile, [''])
test('simpl011', normal, compile, [''])
test('simpl012', normal, compile, [''])
test('simpl013', normal, compile, [''])
test('simpl014', normal, compile, [''])
test('spec001', skip_if_fast, compile, [''])
{-# OPTIONS -fglasgow-exts -O2 #-}
-- This one make SpecConstr generate bogus code (hence -O2),
-- with a lint error, in GHC 6.4.1
-- C.f. http://hackage.haskell.org/trac/ghc/ticket/737
module ShouldCompile where
data IHandler st where
IHandler :: forall st ev res.
Serialize (TxContext ev) => String -> IO ev
-> (res -> IO ()) -> Ev st ev res -> IHandler st
data Ev st ev res = Ev
data TxContext evt = TxContext
data TxConfig = TxConfig
data M a = M a
class Serialize a where
instance Serialize a => Serialize (TxContext a)
instance Serialize Int
instance Serialize ()
data IHR st = forall res ev. Serialize (TxContext ev) => IHR (TxContext ev)
runHandler :: M (IHR st) -> IHandler st -> IO ()
runHandler queue ih@(IHandler tstring inp out run) = runHandler queue ih
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