RE: Solved: Typing problems with polymorphic recursion and typeclasses
7 May
2003
7 May
'03
8:02 a.m.
| I admit I'm confused: can I compose a type expression that describes | the type of h? For example, I plan to document the function h and want | to give its type signature. I don't know what to write. We know that | "(Show fa) => t -> fa" is not it: it's too polymorphic. Is there any | type expression that is polymorphic just enough? It's only "too polymorphic" at the recursive call. You can make that call use a more specific type, using lexically scoped type variables, as has been suggested earlier in this thread. Then you can certainly have a type signature for 'h', as polymorphic as you please. Simon
8514
Age (days ago)
8514
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Peyton-Jones