| > 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.

Yes it is.  'name' would have type
        forall c. ConCls c => String
It requires a type argument, just like map.

Simon
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to