HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulefcf-containers-0.8.2Haskell2010

Fcf.Alg.Symbol

Fcf.Alg.Symbol

Type-level symbols and functions for them.

Note that the operators from this module conflict with GHC.TypeLits.

TODO: Would this whole module have a place first-class-families?

  • 13 types

Reexported type

0 declarations

From Fcf.Data.Symbol (which is from GHC).

Functions

7 declarations
datadata Append (a :: Symbol) (b :: Symbol) (c :: Symbol)
#

Append two type-level symbols.

Example
:kind! Eval (Append "hmm" " ok")

Eval (Append "hmm" " ok") :: Symbol = "hmm ok"

Instances1Eval
datadata Intercalate (a :: Symbol) (b :: [Symbol]) (c :: Symbol)
#

Intercalate type-level symbols.

Example
:kind! Eval (Intercalate "+" '["aa", "bb", "cc"])

Eval (Intercalate "+" '["aa", "bb", "cc"]) :: Symbol = "aa+bb+cc"

:kind! Eval (Intercalate "+" '["aa"])

Eval (Intercalate "+" '["aa"]) :: Symbol = "aa"

:kind! Eval (Intercalate "+" '[])

Eval (Intercalate "+" '[]) :: Symbol = ""

Instances2Eval
datadata IsSpace (a :: Symbol) (b :: Bool)
#

IsSpace

Example
:kind! Eval (IsSpace "a")

Eval (IsSpace "a") :: Bool = 'False

:kind! Eval (IsSpace " ")

Eval (IsSpace " ") :: Bool = 'True

Instances1Eval
  • type Eval (IsSpace s) = Eval (s == " ")Defined in fcf-containers-0.8.2 · Fcf.Alg.Symbol
datadata IsNewLine (a :: Symbol) (b :: Bool)
#

IsNewline

Example
:kind! Eval (IsNewLine "a")

Eval (IsNewLine "a") :: Bool = 'False

:kind! Eval (IsNewLine "\n")

Eval (IsNewLine "n") :: Bool = 'True

Instances1Eval
datadata IsTab (a :: Symbol) (b :: Bool)
#

IsTab

Example
:kind! Eval (IsTab "a")

Eval (IsTab "a") :: Bool = 'False

:kind! Eval (IsTab "\t")

Eval (IsTab "t") :: Bool = 'True

Instances1Eval
  • type Eval (IsTab s) = Eval (s == "\t")Defined in fcf-containers-0.8.2 · Fcf.Alg.Symbol
datadata IsDigit (a :: Symbol) (b :: Bool)
#

IsDigit

Example
:kind! Eval (IsDigit "3")

Eval (IsDigit "3") :: Bool = 'True

:kind! Eval (IsDigit "a")

Eval (IsDigit "a") :: Bool = 'False

Instances1Eval
  • type Eval (IsDigit s) = Eval (Elem s '["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"])Defined in fcf-containers-0.8.2 · Fcf.Alg.Symbol

Comparison functions

6 declarations
datadata SymbolOrd (a :: Symbol) (b :: Symbol) (c :: Ordering)
#

SymbolOrd - compare two symbols and give type-level Ordering ( $ 'LT $, $ 'EQ $ or $ 'GT $ ).

Example
:kind! Eval (SymbolOrd "a" "b")

Eval (SymbolOrd "a" "b") :: Ordering = 'LT

Instances1Eval
datadata (<) (a :: Symbol) (b :: Symbol) (c :: Bool)
#

Less-than comparison for symbols.

Example
:kind! Eval ("a" < "b")

Eval ("a" < "b") :: Bool = 'True

Instances1Eval
datadata (>) (a :: Symbol) (b :: Symbol) (c :: Bool)
#

Larger-than comparison for symbols.

Example
:kind! Eval ("b" > "a")

Eval ("b" > "a") :: Bool = 'True

Instances1Eval
datadata (==) (a :: Symbol) (b :: Symbol) (c :: Bool)
#

Equality of symbols

Example
:kind! Eval ("b" == "a")

Eval ("b" == "a") :: Bool = 'False

Instances1Eval