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

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

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.

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