HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulegenerics-sop-0.5.1.4Haskell2010

Generics.SOP.Sing

Synopsis
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.

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.

valuesList :: SListI xs => SList xs

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

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.

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