Changes between Version 4 and Version 5 of PolymorphicKinds
 Timestamp:
 Oct 17, 2008 8:57:30 AM (7 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

PolymorphicKinds
v4 v5 7 7 {{{ 8 8 #!text/xhaskell 9 f :: forall_kind k. forall (m :: k > *) (a :: k) . m a > Int9 f :: forall_kind (k :: **). forall (m :: k > *) (a :: k) . m a > Int 10 10 f _ = 2 11 11 … … 16 16 }}} 17 17 18 18 19 == Example: Typeable[123..] == 19 20 … … 30 31 class Typeable (k :: **) (t :: k) where 31 32 typeOf :: Proxy t > TypeRep 33 34  Typeable :: forall (k :: **). k > Class 35 36  f :: forall a. a > Int 37  forall a. f (x::a) = 3??? 38  At term level we scope type variables from a separate signature 39  For class decls it's unclear. One possiblity: implicitly bring k into scope, and 40  infer its sort. 41 42  When we call f, we write (f 3) not (f Int 3) 43  Similarly we want to write (Typeable Int) not (Typable * Int) 32 44 33 45 instance Typeable Bool where