Hacker News new | past | comments | ask | show | jobs | submit login

If only Haskell would let me do

  type MTree t = Map t (MTree t)

This version works though.

  data Tree t = Leaf | Node [(t, Tree t)]



The problem is that the type would be expanded indefinitely:

  Map t (Map t (Map t ...
Try:

  newtype MTree t = MTree (Map t (MTree t))




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: