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

  • 1 type
  • 14 values
datadata Dict (c :: k -> Constraint) (a :: k) where
#

An explicit dictionary carrying evidence of a class constraint.

The constraint parameter is separated into a second argument so that Dict c is of the correct kind to be used directly as a parameter to e.g. NP.

Constructors

Instances1Show
  • Show (Dict c a)Defined in sop-core-0.5.0.2 · Data.SOP.Dict
valueall2 :: Dict (All (All c)) xss -> Dict (All2 c) xss
#

Deprecated. 'All2 c' is now a synonym of 'All (All c)'

The constraint All (All c) is convertible to All2 c.

valueall_NP :: NP (Dict c) xs -> Dict (All c) xs
#

If we have a product containing proofs that each element of xs satisfies c, then All c holds for xs.

valueall_POP :: SListI xss => POP (Dict c) xss -> Dict (All2 c) xss
#

If we have a product of products containing proofs that each inner element of xss satisfies c, then All2 c holds for xss.

valuemapAll
  1. :: forall (a :: k). Dict c a -> Dict d a
  2. -> Dict (All c) xs
  3. -> Dict (All d) xs
#

Lifts a dictionary conversion over a type-level list.

valuemapAll2
  1. :: forall (a :: k). Dict c a -> Dict d a
  2. -> Dict (All2 c) xss
  3. -> Dict (All2 d) xss
#

Lifts a dictionary conversion over a type-level list of lists.

valuepureAll :: SListI xs => Dict (All Top) xs
#

A proof that the trivial constraint holds over all type-level lists.

valueunAll_NP :: Dict (All c) xs -> NP (Dict c) xs
#

If we have a constraint c that holds over a type-level list xs, we can create a product containing proofs that each individual list element satisfies c.

valueunAll_POP :: Dict (All2 c) xss -> POP (Dict c) xss
#

If we have a constraint c that holds over a type-level list of lists xss, we can create a product of products containing proofs that all the inner elements satisfy c.

valuewithDict :: Dict c a -> (c a => r) -> r
#

If we have an explicit dictionary, we can unwrap it and pass a function that makes use of it.

valuezipAll :: Dict (All c) xs -> Dict (All d) xs -> Dict (All (And c d)) xs
#

If two constraints c and d hold over a type-level list xs, then the combination of both constraints holds over that list.

valuezipAll2
  1. :: All SListI xss
  2. => Dict (All2 c) xss
  3. -> Dict (All2 d) xss
  4. -> Dict (All2 (And c d)) xss
#

If two constraints c and d hold over a type-level list of lists xss, then the combination of both constraints holds over that list of lists.