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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
{-# LANGUAGE RankNTypes, PolyKinds, GADTs, TypeFamilies #-}
-- Multiline foralls are consistent across all declarations
data D =
forall
(f ::
* -> * -> *)
(x :: *)
(y :: *)
. D (f x y)
data G where
G :: forall
(f ::
* -> * -> *)
(x :: *)
(y :: *)
. f x y -> G
f :: forall
(f ::
* -> * -> *)
(x :: *)
(y :: *)
. f x y -> ()
f = const ()
type family T f x y where
forall
(f ::
* -> * -> *)
(x :: *)
(y :: *)
. T f x y = f x y
{-# RULES
"r"
forall
(f ::
* -> * -> *)
(x :: *)
(y :: *)
. r (a :: f x y) =
()
#-}
|