summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T16255.hs
blob: 2f20d4c788c6f0cb4ddb908505631d98b713e2a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# LANGUAGE Haskell2010 #-}
{-# 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