Commit c8bbc83d authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add a syb-like test

parent 9868542f
......@@ -306,6 +306,7 @@ test('T3391', omit_ways(['profc','profasm']), compile, [''])
test('T3409', normal, compile, [''])
test('T3955', normal, compile, [''])
test('PolyRec', normal, compile, [''])
test('twins', normal, compile, [''])
test('T2412',
extra_clean(['T2412.hi-boot', 'T2412.o-boot',
......
{-# LANGUAGE RankNTypes, LiberalTypeSynonyms #-}
-- This test checks that deep skolemisation and deep
-- instanatiation work right. A buggy prototype
-- of GHC 7.0, where the type checker generated wrong
-- code, sent applyTypeToArgs into a loop.
module Twins where
import Data.Data
type GenericQ r = forall a. Data a => a -> r
type GenericM m = forall a. Data a => a -> m a
gzip :: GenericQ (GenericM Maybe) -> GenericQ (GenericM Maybe)
gzip f x y
= f x y
`orElse`
if toConstr x == toConstr y
then gzipWithM (gzip f) x y
else Nothing
gzipWithM :: Monad m => GenericQ (GenericM m) -> GenericQ (GenericM m)
gzipWithM = error "urk"
orElse :: Maybe a -> Maybe a -> Maybe a
orElse = error "urk"
\ No newline at end of file
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