HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulegenerics-sop-0.5.1.4Haskell2010

Generics.SOP.Sing

  • 3 types
  • 5 values
datadata SList (a :: [k]) where
#

Explicit singleton list.

A singleton list can be used to reveal the structure of a type-level list argument that the function is quantified over. For every type-level list xs, there is one non-bottom value of type SList xs.

Note that these singleton lists are polymorphic in the list elements; we do not require a singleton representation for them.

Constructors

Instances3Eq, Ord, Show
  • Eq (SList xs)Defined in sop-core-0.5.0.2 · Data.SOP.Sing
  • Ord (SList xs)Defined in sop-core-0.5.0.2 · Data.SOP.Sing
  • Show (SList xs)Defined in sop-core-0.5.0.2 · Data.SOP.Sing
typetype SListI = All Top
#

Implicit singleton list.

A singleton list can be used to reveal the structure of a type-level list argument that the function is quantified over.

Since 0.4.0.0, this is now defined in terms of All. A singleton list provides a witness for a type-level list where the elements need not satisfy any additional constraints.

valuesList :: SListI xs => SList xs
#

Get hold of an explicit singleton (that one can then pattern match on) for a type-level list

valuepara_SList
  1. :: SListI xs
  2. => r '[]
  3. -> forall (y :: a) (ys :: [a]). SListI ys => r ys -> r (y ': ys)
  4. -> r xs
#

Paramorphism for a type-level list.

valuecase_SList
  1. :: SListI xs
  2. => r '[]
  3. -> forall (y :: a) (ys :: [a]). SListI ys => r (y ': ys)
  4. -> r xs
#

Case distinction on a type-level list.