* Miguel Mitrofanov:

> Not sure if that's what you need:
>
> data NodeF f = Node {name :: String, refs :: [f (NodeF f)]}
>
> newtype Const a b = Const a
> newtype Id a = Id a
>
> type NodeS = NodeF (Const String)
> type Node = NodeF Id

Thanks for the suggestion.  Yes, the resulting syntax looks better,
and it is more obvious to me what is going on.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to