[jhc] Is there a working example of type families usage?

Artyom yom at artyom.me
Tue Apr 21 13:45:44 UTC 2015


I tried this:

|{-# LANGUAGE TypeFamilies #-}

class  C  xwhere
   type  A  x
|

It fails with this error:

|Temp/jhc1.hs:4   - Error: parse error at "}"
|

Standalone type families don’t work either:

|{-# LANGUAGE TypeFamilies #-}

type  family  A  x
|

|Temp/jhc1.hs:3   - Error: parse error at "family"
|

Is there an example somewhere that I missed while googling?

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/jhc/attachments/20150421/d9909336/attachment.html>


More information about the jhc mailing list