summaryrefslogtreecommitdiff
path: root/testsuite/tests/dependent/should_compile/T11719.hs
blob: ba4d7c9db49e1041bc05e347989c09dfb25aee8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE RankNTypes, TypeFamilies, TypeInType, TypeOperators,
             UndecidableInstances #-}

module T11719 where

import Data.Kind

data TyFun :: * -> * -> *
type a ~> b = TyFun a b -> *

type family (f :: a ~> b) @@ (x :: a) :: b

data Null a = Nullable a | NotNullable a

type family ((f :: b ~> c) ∘ (g :: a ~> b)) (x :: a) :: c where
  (f ∘ g) x = f @@ (g @@ x)

type family BaseType (k :: forall a. a ~> Type) (x :: b) :: Type where   -- this fails :(