Symbol package:parameterized-utils
(Kind) This is the kind of type-level symbols.
This defines a type family
SymbolRepr for representing a
type-level string (AKA symbol) at runtime. This can be used to branch
on a type-level value.
The
TestEquality and
OrdF instances for
SymbolRepr are implemented using
unsafeCoerce. This
should be typesafe because we maintain the invariant that the string
value contained in a SymbolRepr value matches its static type.
At the type level, symbols have very few operations, so SymbolRepr
correspondingly has very few functions that manipulate them.
A runtime representation of a GHC type-level symbol.
The underlying text representation of the symbol
This class gives the string associated with a type-level symbol. There
are instances of the class for every concrete literal: "hello", etc.
Generate a value representative for the type level symbol.
Generate a symbol representative at runtime. The type-level symbol
will be abstract, as it is hidden by the
Some constructor.