[GHC] #11775: singleton classes in ghc.generics are defined but not exported

GHC ghc-devs at haskell.org
Wed Mar 30 19:36:09 UTC 2016


#11775: singleton classes in ghc.generics are defined but not exported
-------------------------------------+-------------------------------------
           Reporter:  carter         |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1-rc2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I noticed in the bottom of the GHC.Generics module in the RC candidate
 that theres some type classea and instnaces involving singletons included
 and notated as copied from the singletons package but not exported

 {{{


 --------------------------------------------------------------------------------
 -- Copied from the singletons package
 --------------------------------------------------------------------------------

 -- | The singleton kind-indexed data family.
 data family Sing (a :: k)

 -- | A 'SingI' constraint is essentially an implicitly-passed singleton.
 -- If you need to satisfy this constraint with an explicit singleton,
 please
 -- see 'withSingI'.
 class SingI (a :: k) where
   -- | Produce the singleton explicitly. You will likely need the
 @ScopedTypeVariables@
   -- extension to use this method the way you want.
   sing :: Sing a

 -- | The 'SingKind' class is essentially a /kind/ class. It classifies all
 kinds
 -- for which singletons are defined. The class supports converting between
 a singleton
 -- type and the base (unrefined) type which it is built from.
 class (kparam ~ 'KProxy) => SingKind (kparam :: KProxy k) where
   -- | Get a base type from a proxy for the promoted kind. For example,
   -- @DemoteRep ('KProxy :: KProxy Bool)@ will be the type @Bool at .
   type DemoteRep kparam :: *

   -- | Convert a singleton to its unrefined version.
   fromSing :: Sing (a :: k) -> DemoteRep kparam

 }}}

 etc, is this deliberate?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11775>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list