blob: ef2f0a9cb6ffc9f3e96687630ce7ec53d3931778 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
module T16255 where
import Data.Kind
import GHC.TypeLits
data SBool :: Bool -> Type
type family F1 :: forall k. k -> Type where
F1 @Bool = SBool
data family D1 :: forall k. k -> Type
-- Note that this similar-looking data family instance is OK, since data family
-- instances permit oversaturation in their equations.
data instance D1 @Bool :: Bool -> Type
type family F2 (x :: j) :: forall k. Either j k where
F2 5 @Symbol = Left 4
|