blob: 02475f6cb1993b24008ec19806984f32e2d081d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DatatypeContexts #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UnliftedNewtypes #-}
module EtaExpandDataFamily where
import Data.Kind
import GHC.Exts
type N :: forall (r :: RuntimeRep) -> TYPE r -> TYPE r
data family N r a
newtype instance N r a = MkN a
foo :: Int# -> N IntRep Int#
foo = MkN
type N :: forall (r :: RuntimeRep) -> TYPE r -> Type -> Type -> Type -> TYPE r
data family N r a i
newtype instance Ord b => N r a Int b c = MkN a
foo :: Ord b => Int# -> N IntRep Int# Int b c
foo = MkN
|