[Haskell-cafe] Type union

Carter Schonwald carter.schonwald at gmail.com
Mon Sep 15 17:24:16 UTC 2014


i should point out the HList package has a lot of tooling for things like
this, and the author Adam says that its quite usable (aside from the dearth
of docs beyond the crazy typeful haddocks :) )

https://hackage.haskell.org/package/HList

On Mon, Sep 15, 2014 at 12:58 PM, Dmitry Bogatov <KAction at gnu.org> wrote:

> * Richard Eisenberg <eir at cis.upenn.edu> [2014-09-15 08:56:05-0400]
> > Have you tried using closed type families with the type-level (==)
> > operator from GHC 7.8's Data.Type.Equality? That's how I've done
> > unions before. The key step is to use a closed type family to write a
> > type family equation that triggers when two types do *not* equal.
> >
> > Let me know if you need more info...
> Thanks. I will take a look for my education, but
> I am on Debian, so no more, then ghc 7.6.3.
>
> I found type-settheory package, but it fails to build.
>
> --
> Best regards, Dmitry Bogatov <KAction at gnu.org>,
> Free Software supporter, esperantisto and netiquette guardian.
> GPG: 54B7F00D
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140915/a9a06f89/attachment.html>


More information about the Haskell-Cafe mailing list