ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Util.Singletons

Description

Singletons

This provides the core of the singletons package, using the same name, but without pulling in all the dependencies and craziness.

Synopsis

Documentation

data family Sing (a ∷ k) Source #

Data family of singletons

Instances

Instances details
data Sing (xs ∷ [k]) Source #

Singletons for lists

NOTE: Unlike the singletons library, we do not require instances for the elements of the list.

Instance details

Defined in Ouroboros.Consensus.Util.Singletons

data Sing (xs ∷ [k]) where

class SingI (a ∷ k) where Source #

Methods

singSing a Source #

Instances

Instances details
SingI ('[] ∷ [k]) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Singletons

Methods

singSing '[] Source #

SingI xs ⇒ SingI (x ': xs ∷ [a]) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Singletons

Methods

singSing (x ': xs) Source #

class SingKind k where Source #

Associated Types

type Demote k = (r ∷ Type) | r → k Source #

Methods

fromSingSing (a ∷ k) → Demote k Source #

toSingDemote k → SomeSing k Source #

data SomeSing k where Source #

Constructors

SomeSingSing (a ∷ k) → SomeSing k 

withSomeSing ∷ ∀ k r. SingKind k ⇒ Demote k → (∀ (a ∷ k). Sing a → r) → r Source #