Modulesop-core-0.5.0.2Haskell2010
Data.SOP.Dict
Explicit dictionaries.
When working with compound constraints such as constructed using All or All2, GHC cannot always prove automatically what one would expect to hold.
This module provides a way of explicitly proving conversions between such constraints to GHC. Such conversions still have to be manually applied.
This module remains somewhat experimental. It is therefore not exported via the main module and has to be imported explicitly.
- 1 type
- 14 values
- Packagesop-core-0.5.0.2
- Exports15
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceDict.hs
A proof that the trivial constraint holds over all type-level lists.
A proof that the trivial constraint holds over all type-level lists of lists.
Lifts a dictionary conversion over a type-level list.
Lifts a dictionary conversion over a type-level list of lists.
If two constraints c and d hold over a type-level
list xs, then the combination of both constraints holds
over that list.
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.
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.
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.
If we have a product containing proofs that each element
of xs satisfies c, then All c holds for xs.
If we have a product of products containing proofs that
each inner element of xss satisfies c, then All2 c
holds for xss.
If we have an explicit dictionary, we can unwrap it and pass a function that makes use of it.
A structure of dictionaries.