José Pedro Magalhães | 29 Oct 10:46 2012
Picon

Using GHC.TypeLits and singletons

Hi Iavor and Richard (CC ghc-users),

If I recall correctly, Richard designed his singletons package in such a way that it would interact nicely
with Iavor's type-level literals. Now I find myself in a situation where I need to use both type-level literals
and singletons (basically because I'm reflecting at the value level both naturals, strings, and more
complicated datatypes). But I see that the declarations of entities such as Sing, SingI, etc., are
duplicated in the singletons package (seeing that they are already in GHC 7.6 within GHC.TypeLits).
My question is: how can I use these two together?


Thanks,
Pedro

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Richard Eisenberg | 29 Oct 16:50 2012

Re: Using GHC.TypeLits and singletons

You do recall correctly; they are supposed to work together. We discovered that they didn't a few weeks ago.
Iavor has updated his implementation of TypeLits in HEAD. I still have to update singletons, which I will
now do. Expect this update later today. In the meantime, make sure you have a version of libraries/base
pulled in the last 13 days, as you will need the updated TypeLits.

Richard

On Oct 29, 2012, at 5:46 AM, José Pedro Magalhães <jpm <at> cs.uu.nl> wrote:

> Hi Iavor and Richard (CC ghc-users),
> 
> If I recall correctly, Richard designed his singletons package in such a way that it would interact nicely
> with Iavor's type-level literals. Now I find myself in a situation where I need to use both type-level literals
> and singletons (basically because I'm reflecting at the value level both naturals, strings, and more
> complicated datatypes). But I see that the declarations of entities such as Sing, SingI, etc., are 
> duplicated in the singletons package (seeing that they are already in GHC 7.6 within GHC.TypeLits).
> My question is: how can I use these two together?
> 
> 
> Thanks,
> Pedro
> 

Gmane