Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- pzipWith ∷ ∀ p name uni fun ann1 ann2 ann3 m. (p ~ Program name uni fun, Eq (Term name uni fun ()), MonadError String m) ⇒ (ann1 → ann2 → ann3) → p ann1 → p ann2 → m (p ann3)
- pzip ∷ (p ~ Program name uni fun, Eq (Term name uni fun ()), MonadError String m) ⇒ p ann1 → p ann2 → m (p (ann1, ann2))
- tzipWith ∷ ∀ t name uni fun ann1 ann2 ann3 m. (t ~ Term name uni fun, Eq (t ()), MonadError String m) ⇒ (ann1 → ann2 → ann3) → t ann1 → t ann2 → m (t ann3)
- tzip ∷ (t ~ Term name uni fun, Eq (t ()), MonadError String m) ⇒ t ann1 → t ann2 → m (t (ann1, ann2))
Documentation
pzipWith ∷ ∀ p name uni fun ann1 ann2 ann3 m. (p ~ Program name uni fun, Eq (Term name uni fun ()), MonadError String m) ⇒ (ann1 → ann2 → ann3) → p ann1 → p ann2 → m (p ann3) Source #
Zip two programs using a combinator function for annotations.
Throws an error if the input programs are not "equal" modulo annotations.
Note that the function is "left-biased", so in case that the 2 input programs contain Name
s,
the output program will contain just the Name
s of the first input program.
pzip ∷ (p ~ Program name uni fun, Eq (Term name uni fun ()), MonadError String m) ⇒ p ann1 → p ann2 → m (p (ann1, ann2)) Source #
Zip 2 programs by pairing their annotations
tzipWith ∷ ∀ t name uni fun ann1 ann2 ann3 m. (t ~ Term name uni fun, Eq (t ()), MonadError String m) ⇒ (ann1 → ann2 → ann3) → t ann1 → t ann2 → m (t ann3) Source #
Zip two terms using a combinator function for annotations.
Throws an error if the input terms are not "equal" modulo annotations.
Note that the function is "left-biased", so in case that the 2 input terms contain Name
s,
the output term will contain just the Name
s of the first input term.
TODO: this is not an optimal implementation