
Am Donnerstag, 21. April 2005 20:00 schrieben Sie:
Daniel, Thanks for your offer to help me.
There was a site with some challenges on extending Thompsons code, and the first question they asked was the following:
------------------------------------------------------ Extend matchType so that it becomes capable of parsing polymorphic types like Either a b.
Hint. Define a new type, VarName, capable of representing variables, like a, b and entry, as well as its associated parser matchVarName.
You might want to Add a new constructor, PolyT, to the definition of Type to represent polymorphic types, and define its associated parser matchPolyT. Adjust any other functions that definitely need adjusting ------------------------------------------------------
I hope this helps you understand what Im trying to achieve more clearly.
Regards Mike Richards
Partly. The Problem now is, I don't know what this refers to. No 'matchType' etc. appear in my copy of Thompson's book - maybe it's been added after I bought mine. I suppose, part of the exercise is parsing type signatures, right? To be of real assistance, I'd need to know what's given, so URL or direct text would be great. Daniel
participants (1)
-
Daniel Fischer