| Copyright | (c) 2021-2024 Rudy Matela |
|---|---|
| License | 3-Clause BSD (see the file LICENSE) |
| Maintainer | Rudy Matela <rudy@matela.com.br> |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Conjure.Prim
Description
Synopsis
- type Prim = (Expr, Reification)
- prim :: Conjurable a => String -> a -> Prim
- pr :: (Conjurable a, Show a) => a -> Prim
- prif :: Conjurable a => a -> Prim
- primOrdCaseFor :: Conjurable a => a -> Prim
- cjHoles :: [Prim] -> [Expr]
- cjTiersFor :: [Prim] -> Expr -> [[Expr]]
- cjAreEqual :: [Prim] -> Int -> Expr -> Expr -> Bool
- cjMkEquation :: [Prim] -> Expr -> Expr -> Expr
Documentation
type Prim = (Expr, Reification) Source #
A primtive expression (paired with instance reification).
prif :: Conjurable a => a -> Prim Source #
Provides an if condition bound to the given return type.
primOrdCaseFor :: Conjurable a => a -> Prim Source #
Provides a case condition bound to the given return type.
cjHoles :: [Prim] -> [Expr] Source #
Computes a list of holes encoded as Exprs from a list of Prims.
This function mirrors functionality from conjureHoles.
cjTiersFor :: [Prim] -> Expr -> [[Expr]] Source #
Given a list of Prims,
returns a function that given an Expr
will return tiers of test Expr values.
This is used in cjAreEqual.
cjMkEquation :: [Prim] -> Expr -> Expr -> Expr Source #
Computes a function that equates two Exprs from a list of Prims.
This function mirrors functionality from conjureMkEquation.