Commit fe178b27 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #9750

parent 09aac7da
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
module T9750 where
import GHC.TypeLits ( Symbol, KnownSymbol )
--------------------------------------------------------------------------------
data Meta = MetaCons Symbol
data M1 (c :: Meta) = M1
class Generic a where
type Rep a :: *
from :: a -> Rep a
--------------------------------------------------------------------------------
data A = A1
instance Generic A where
type Rep A = M1 ('MetaCons "test")
from A1 = M1
class GShow' f where
gshowsPrec' :: f -> ShowS
instance (KnownSymbol c) => GShow' (M1 ('MetaCons c)) where
gshowsPrec' = error "urk"
instance GShow' A where
gshowsPrec' = gshowsPrec' . from
......@@ -108,3 +108,4 @@ test('T9263', normal, run_command, ['$MAKE -s --no-print-directory T9263'])
test('T9063', normal, compile, [''])
test('T9200', normal, compile, [''])
test('T9200b', normal, compile_fail, [''])
test('T9750', normal, compile, [''])
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