haskus-utils-types-1.4.1: Haskus types utility modules

Safe HaskellSafe
LanguageHaskell2010

Haskus.Utils.Types.Symbol

Description

Type-level Symbol (i.e. string)

Synopsis

Documentation

data Symbol #

(Kind) This is the kind of type-level symbols. Declared here because class IP needs it

Instances
SingKind Symbol

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep Symbol :: Type

Methods

fromSing :: Sing a -> DemoteRep Symbol

KnownSymbol a => SingI (a :: Symbol)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing a

data Sing (s :: Symbol) 
Instance details

Defined in GHC.Generics

data Sing (s :: Symbol) where
type DemoteRep Symbol 
Instance details

Defined in GHC.Generics

type DemoteRep Symbol = String

symbolValue :: forall (s :: Symbol). KnownSymbol s => String Source #

class KnownSymbol (n :: Symbol) #

This class gives the string associated with a type-level symbol. There are instances of the class for every concrete literal: "hello", etc.

Since: base-4.7.0.0

Minimal complete definition

symbolSing

type family CmpSymbol (a :: Symbol) (b :: Symbol) :: Ordering where ... #

Comparison of type-level symbols, as a function.

Since: base-4.7.0.0

data SomeSymbol where #

This type represents unknown type-level symbols.

Constructors

SomeSymbol :: forall (n :: Symbol). KnownSymbol n => Proxy n -> SomeSymbol

Since: base-4.7.0.0

Instances
Eq SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Ord SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Read SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Show SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

sameSymbol :: (KnownSymbol a, KnownSymbol b) => Proxy a -> Proxy b -> Maybe (a :~: b) #

We either get evidence that this function was instantiated with the same type-level symbols, or Nothing.

Since: base-4.7.0.0

someSymbolVal :: String -> SomeSymbol #

Convert a string into an unknown type-level symbol.

Since: base-4.7.0.0