[Haskell-cafe] Hackage libraries that make use of GADTs
Rogan Creswick
creswick at gmail.com
Fri Apr 18 15:20:13 UTC 2014
On Fri, Apr 18, 2014 at 12:22 AM, George Karachalias <
george.karachalias at gmail.com> wrote:
> Hello,
>
> Could you tell me some Hackage Libraries that make use (heavy or not) of
> GADTs?
>
I used GADTs in the HaVSA library (https://github.com/creswick/HaVSA, and
on hackage: https://hackage.haskell.org/package/HaVSA).
Take a look at the VersionSpaces data type (
https://github.com/creswick/HaVSA/blob/master/src/AI/VersionSpaces.hs).
This is a tree-style type that creates tuples (representing functions) --
the input and output types at each level of the tree can be different, but
only the top-level types are relevant when using a VersionSpace. GADTs were
recommended as a way to create a single tree type that could be
type-correct but have heterogenous types.
I doubt anyone is actually using HaVSA, though! It's one of the first
haskell projects I worked on, and was an adaptation of a java library I
created for an actual project. If anyone is interested in comparing the
two implementations, here's the parallel java version:
https://code.google.com/p/jversionspaces/ (But please note that this is a
/horrible/ use case for Java; it would be much cleaner if Java had type
aliasing.)
--Rogan
> George
>
> --
> things you own end up owning you
>
> _______________________________________________
> 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/20140418/76a10938/attachment.html>
More information about the Haskell-Cafe
mailing list