On Wed, Feb 20, 2002 at 01:15:36PM -0800, Simon Peyton-Jones wrote:
> Another possiblity would be to make the ConCls class look like this
>       class ConCls c where
>         name :: String
>         arity :: Int 
>         ...etc...
> 
> Now we'd have to give an explicit type argument at the call site:
> 
>       show {| Constr c t |} (Con x) = (name {| c |}) ++ show x
> 
> I quite like the thought of being able to supply explicit type
> arguments....
> but I don't konw how to speak about the order of type parameters.
> What order does map takes its two type parameters in?

Sorry, this seems like a non-sequitur to me?

'map' has type '(a->b) -> [a] -> [b]'; supplying explicit type
parameters would mean giving values to 'a' and 'b'.  If I wanted to
propose notation for this, I would suggest, e.g.,
  (map :: (String -> Int) -> [String] -> [Int]) length ["Hello", "World"]

'name' (above) has type 'String'; the '{| c |}' is not providing a type
parameter in the same sense.

What am I missing?

Best,
        Dylan

Attachment: msg01379/pgp00000.pgp
Description: PGP signature

Reply via email to