undefined type prob
Tom Pledger
Tom.Pledger@peace.com
Thu, 1 May 2003 12:20:31 +1200
James Grist writes:
| I've got a prob with the Function toHeap. It return an
| argument with an undefined type. Well, I think that's
| got something to do with why I can`t get it to work.
| OK, for it's input, it takes a list of some datatype,
| so I try at the hugs console....
|
| toHeap "hello"
|
| ERROR - Unresolved overloading
| *** Type : Heap a => a Char
| *** Expression : toHeap "hello"
|
| How do I get round this prob?
Say which Heap instance you want. It won't automatically default to
Tree, even though that's the only Heap instance in scope.
toHeap "hello" :: Tree Char