Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. package singletons-base

    A promoted and singled version of the base library singletons-base uses singletons-th to define promoted and singled functions from the base library, including the Prelude. This library was originally presented in Dependently Typed Programming with Singletons, published at the Haskell Symposium, 2012. (https://richarde.dev/papers/2012/singletons/paper.pdf) See also the paper published at Haskell Symposium, 2014, which describes how promotion works in greater detail: https://richarde.dev/papers/2014/promotion/promotion.pdf. WARNING: singletons-base defines orphan instances for Sing, SingKind, etc. for common types such as Bool, [], Maybe, etc. If you define instances of these types in your code, you will likely not be able to use that code with singletons-base. singletons-base uses code that relies on bleeding-edge GHC language extensions. As such, singletons-base only supports the latest major version of GHC (currently GHC 9.10). For more information, consult the singletons README. You may also be interested in the following related libraries:

    • The singletons library is a small, foundational library that defines basic singleton-related types and definitions.
    • The singletons-th library defines Template Haskell functionality that allows promotion of term-level functions to type-level equivalents and singling functions to dependently typed equivalents.

  2. singletonStar :: OptionsMonad q => [Name] -> q [Dec]

    singletons-base Data.Singletons.Base.CustomStar

    Produce a representation and singleton for the collection of types given. A datatype Rep is created, with one constructor per type in the declared universe. When this type is promoted by the singletons-th library, the constructors become full types in *, not just promoted data constructors. For example,

    $(singletonStar [''Nat, ''Bool, ''Maybe])
    
    generates the following:
    data Rep = Nat | Bool | Maybe Rep deriving (Eq, Ord, Read, Show)
    
    and its singleton. However, because Rep is promoted to *, the singleton is perhaps slightly unexpected:
    data SRep (a :: *) where
    SNat :: Sing Nat
    SBool :: Sing Bool
    SMaybe :: Sing a -> Sing (Maybe a)
    type instance Sing = SRep
    
    The unexpected part is that Nat, Bool, and Maybe above are the real Nat, Bool, and Maybe, not just promoted data constructors. Please note that this function is very experimental. Use at your own risk.

  3. singletons :: OptionsMonad q => q [Dec] -> q [Dec]

    singletons-base Data.Singletons.Base.TH

    Make promoted and singled versions of all declarations given, retaining the original declarations. See the README for further explanation.

  4. singletonsOnly :: OptionsMonad q => q [Dec] -> q [Dec]

    singletons-base Data.Singletons.Base.TH

    Make promoted and singled versions of all declarations given, discarding the original declarations. Note that a singleton based on a datatype needs the original datatype, so this will fail if it sees any datatype declarations. Classes, instances, and functions are all fine.

  5. singletonU :: Word8 -> ByteArray

    byteslice Data.Bytes

    Create an unsliced byte sequence with one byte.

  6. singletonUnliftedArray :: PrimUnlifted a => a -> UnliftedArray a

    primitive-unlifted Data.Primitive.Unlifted.Array

    No documentation available.

  7. singletonUnliftedArray :: PrimUnlifted a => a -> UnliftedArray a

    primitive-unlifted Data.Primitive.Unlifted.Array.ST

    No documentation available.

  8. singletonSmallUnliftedArray :: PrimUnlifted a => a -> SmallUnliftedArray a

    primitive-unlifted Data.Primitive.Unlifted.SmallArray

    No documentation available.

  9. singletonSmallUnliftedArray :: PrimUnlifted a => a -> SmallUnliftedArray a

    primitive-unlifted Data.Primitive.Unlifted.SmallArray.ST

    No documentation available.

  10. singletonRequesterData :: RequesterDataKey a -> f a -> RequesterData f

    reflex Reflex.Requester.Base

    No documentation available.

Page 42 of many | Previous | Next