blob: bc649a7c634d7a9023c53b1fa229e0ec76a11a64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{-# LANGUAGE GADTs, StandaloneKindSignatures, PolyKinds, RankNTypes #-}
import GHC.Types (Type)
type AppTreeT :: forall k. k -> Type
data AppTreeT a where
Con :: AppTreeT a
App :: AppTreeT a -> AppTreeT b -> AppTreeT (a b)
tmt :: AppTreeT (Maybe Bool)
tmt = App (Con :: AppTreeT Maybe) Con
f :: AppTreeT a -> Bool
f (App (c@Con) _) = const True c
f _ = False
|