Changes between Version 4 and Version 5 of PolymorphicKinds


Ignore:
Timestamp:
Oct 17, 2008 8:57:30 AM (6 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PolymorphicKinds

    v4 v5  
    77{{{ 
    88#!text/x-haskell 
    9 f :: forall_kind k . forall (m :: k -> *) (a :: k) . m a -> Int 
     9f :: forall_kind (k :: **). forall (m :: k -> *) (a :: k) . m a -> Int 
    1010f _ = 2 
    1111 
     
    1616}}} 
    1717 
     18 
    1819== Example: Typeable[123..] == 
    1920 
     
    3031class Typeable (k :: **) (t :: k) where 
    3132  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) 
    3244 
    3345instance Typeable Bool where