Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • How to specify the types of x and y if x and y is type Tree? Tree a = Node a | Empty Commented Apr 26, 2013 at 17:05
  • @user1308990: I'm not quite sure what you mean, but you can just do the same as you would for any function. Operators only have slightly different syntax. Commented Apr 26, 2013 at 17:12
  • OK.I got it . i do it to understand how overloading works. Now it is clear. However , i have one question too and i commented the question below the @amindfv 's answer . Could you clear it? Thanks Commented Apr 26, 2013 at 17:38
  • @user1308990: No, you don't need to list == in the exports. Instances are exported automatically. Commented Apr 26, 2013 at 17:42