
Neil Rutland wrote:
ttyyppee LLiinnee == [[((((SSttrriinngg,,SSttrriinngg)),,((SSttrriinngg,,IInntt)),,((SSttrriinngg,,IInntt)),,((SSttrriinngg,,BBooooll)),, ((SSttrriinngg,,BBooooll)),,((SSttrriinngg,,BBooooll)),,((SSttrriinngg,,BBooooll)),,((SSttrriinngg,,BBooooll)),,((SSttrriinngg,,BBooooll)),, ((SSttrriinngg,,BBooooll)),,((SSttrriinngg,,BBooooll)),,((SSttrriinngg,,BBooooll))))]]
What's wrong with a record? *> data Line = Line { a1 :: String, a2 :: Int, ... } While you're at it, you might want to give the fields sensible names.
Anyway when i enter something such as lookup "a1" i get back a load of stuff about Eq.....
lookup expects a list of pairs, but you're passing it a tuple. A list would have to be homogenous, your tuple isn't, therefore lookup cannot do what you want. Just use a record. Udo. -- Languages shape the way we think, or don't. -- Erik Naggum