singletons stuff in GHC.Generics?

Hey All, i just noticed that theres some Singletons code in the GHC.Generics module thats defined but not exported, whats the context on that? https://ghc.haskell.org/trac/ghc/ticket/11775#ticket is the ticket i created to track / ask for clarificaiton:) _Carter

Carter Schonwald
Hey All, i just noticed that theres some Singletons code in the GHC.Generics module thats defined but not exported, whats the context on that?
It's used strictly internally in instances defined in GHC.Generics. For instance, instance (KnownSymbol n, SingI f, SingI r) => Constructor ('MetaCons n f r) where conName _ = symbolVal (Proxy :: Proxy n) conFixity _ = fromSing (sing :: Sing f) conIsRecord _ = fromSing (sing :: Sing r) Cheers, - Ben

GOTCHA,
thanks, i was being a bit myopic in looking around, :)
On Wed, Mar 30, 2016 at 3:46 PM, Ben Gamari
Carter Schonwald
writes: Hey All, i just noticed that theres some Singletons code in the GHC.Generics module thats defined but not exported, whats the context on that?
It's used strictly internally in instances defined in GHC.Generics. For instance,
instance (KnownSymbol n, SingI f, SingI r) => Constructor ('MetaCons n f r) where conName _ = symbolVal (Proxy :: Proxy n) conFixity _ = fromSing (sing :: Sing f) conIsRecord _ = fromSing (sing :: Sing r)
Cheers,
- Ben
participants (2)
-
Ben Gamari
-
Carter Schonwald