Commit 01906c73 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #9565 and #9583

parent 5fa6e759
{-# LANGUAGE TypeFamilies, FlexibleContexts, UndecidableInstances #-}
-- This is a copy of typecheck/should_run/T3500b, but it's here for
-- a different reason: at one time, it sent the compiler into a loop.
-- ANd T3500b isn't tested 'fast' mode
module T9565 where
newtype Mu f = Mu (f (Mu f))
type family Id m
type instance Id m = m
instance Show (Id (f (Mu f))) => Show (Mu f) where
show (Mu f) = show f
showMu :: Mu (Either ()) -> String
showMu = show
item :: Mu (Either ())
item = Mu (Right (Mu (Left ())))
main = print (showMu item)
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# OPTIONS_GHC -O #-}
module T9583 where
import Data.Binary ( Binary(..) )
import Data.Data ( Data )
import Data.Typeable ( Typeable )
import GHC.Generics ( Generic )
data T = A
| B
| C T
| D T T
| E T T
deriving (Data, Generic, Typeable)
instance Binary T
......@@ -207,3 +207,5 @@ test('T8848a', only_ways(['optasm']), compile, ['-ddump-rules'])
test('T8331', only_ways(['optasm']), compile, ['-ddump-rules'])
test('T6056', only_ways(['optasm']), multimod_compile, ['T6056', '-v0 -ddump-rule-firings'])
test('T9400', only_ways(['optasm']), compile, ['-O0 -ddump-simpl -dsuppress-uniques'])
test('T9583', only_ways(['optasm']), compile, [''])
test('T9565', only_ways(['optasm']), 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