Skip to content
Lambdageek edited this page Aug 2, 2014 · 1 revision

Welcome to the unbound-generics wiki!

Overview

So the basic plan is to follow the design of the original unbound library but to use Data.Typeable and GHC.Generics instead of RepLib for the datatype-generic portions.

The goal, I think, eventually is to let you replace:

    import Generics.RepLib
    import Unbound.LocallyNameless    

    data MyType =  ...

    $(derive [''MyType])

    instance Alpha MyType

by

    {-# LANGUAGE DeriveGeneric #-}
    import GHC.Generics

    import Unbound.Generics.LocallyNameless

    data MyType = ...
         deriving Generic

    instance Alpha MyType

and have everything continue working.

Why bother?

One less library depenedency (on the theory that GHC.Generics comes for free with base >= 4.6).

Clone this wiki locally