syntactic-1.12.1: Generic abstract syntax, and utilities for embedded languages

Safe HaskellNone

Language.Syntactic.Sugar

Description

"Syntactic sugar"

Synopsis

Documentation

class Syntactic a whereSource

It is usually assumed that (desugar (sugar a)) has the same meaning as a.

Associated Types

type Domain a :: * -> *Source

type Internal a Source

Methods

desugar :: a -> ASTF (Domain a) (Internal a)Source

sugar :: ASTF (Domain a) (Internal a) -> aSource

Instances

(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, IsHODomain dom p pVar, p (Internal a -> Internal b), p (Internal a), pVar (Internal a)) => Syntactic (a -> b) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, InjectC Tuple dom (Internal a, Internal b), InjectC Select dom (Internal a), InjectC Select dom (Internal b)) => Syntactic (a, b) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, TupleSat dom p, p (Internal a, Internal b), p (Internal a), p (Internal b), InjectC (:|| Tuple p) dom (Internal a, Internal b), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b)) => Syntactic (a, b) 
Syntactic (ASTF dom a) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, InjectC Tuple dom (Internal a, Internal b, Internal c), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c)) => Syntactic (a, b, c) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, TupleSat dom p, p (Internal a, Internal b, Internal c), p (Internal a), p (Internal b), p (Internal c), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c)) => Syntactic (a, b, c) 
(Syntactic a, ~ (* -> *) (Domain a) dom, IsHODomain dom Typeable pVar, InjectC (MONAD m) dom (m (Internal a)), Monad m, Typeable1 m, Typeable (Internal a), pVar (Internal a)) => Syntactic (Mon dom m a) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d)) => Syntactic (a, b, c, d) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d), p (Internal a), p (Internal b), p (Internal c), p (Internal d), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d)) => Syntactic (a, b, c, d) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e)) => Syntactic (a, b, c, d, e) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e)) => Syntactic (a, b, c, d, e) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f)) => Syntactic (a, b, c, d, e, f) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f)) => Syntactic (a, b, c, d, e, f) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f), InjectC Select dom (Internal g)) => Syntactic (a, b, c, d, e, f, g) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g)) => Syntactic (a, b, c, d, e, f, g) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f), InjectC Select dom (Internal g), InjectC Select dom (Internal h)) => Syntactic (a, b, c, d, e, f, g, h) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), p (Internal h), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g), InjectC (:|| Select p) dom (Internal h)) => Syntactic (a, b, c, d, e, f, g, h) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f), InjectC Select dom (Internal g), InjectC Select dom (Internal h), InjectC Select dom (Internal i)) => Syntactic (a, b, c, d, e, f, g, h, i) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), p (Internal h), p (Internal i), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g), InjectC (:|| Select p) dom (Internal h), InjectC (:|| Select p) dom (Internal i)) => Syntactic (a, b, c, d, e, f, g, h, i) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f), InjectC Select dom (Internal g), InjectC Select dom (Internal h), InjectC Select dom (Internal i), InjectC Select dom (Internal j)) => Syntactic (a, b, c, d, e, f, g, h, i, j) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), p (Internal h), p (Internal i), p (Internal j), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g), InjectC (:|| Select p) dom (Internal h), InjectC (:|| Select p) dom (Internal i), InjectC (:|| Select p) dom (Internal j)) => Syntactic (a, b, c, d, e, f, g, h, i, j) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f), InjectC Select dom (Internal g), InjectC Select dom (Internal h), InjectC Select dom (Internal i), InjectC Select dom (Internal j), InjectC Select dom (Internal k)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), p (Internal h), p (Internal i), p (Internal j), p (Internal k), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g), InjectC (:|| Select p) dom (Internal h), InjectC (:|| Select p) dom (Internal i), InjectC (:|| Select p) dom (Internal j), InjectC (:|| Select p) dom (Internal k)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, Syntactic l, ~ (* -> *) (Domain l) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f), InjectC Select dom (Internal g), InjectC Select dom (Internal h), InjectC Select dom (Internal i), InjectC Select dom (Internal j), InjectC Select dom (Internal k), InjectC Select dom (Internal l)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, Syntactic l, ~ (* -> *) (Domain l) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), p (Internal h), p (Internal i), p (Internal j), p (Internal k), p (Internal l), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g), InjectC (:|| Select p) dom (Internal h), InjectC (:|| Select p) dom (Internal i), InjectC (:|| Select p) dom (Internal j), InjectC (:|| Select p) dom (Internal k), InjectC (:|| Select p) dom (Internal l)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, Syntactic l, ~ (* -> *) (Domain l) dom, Syntactic m, ~ (* -> *) (Domain m) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l, Internal m), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f), InjectC Select dom (Internal g), InjectC Select dom (Internal h), InjectC Select dom (Internal i), InjectC Select dom (Internal j), InjectC Select dom (Internal k), InjectC Select dom (Internal l), InjectC Select dom (Internal m)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, Syntactic l, ~ (* -> *) (Domain l) dom, Syntactic m, ~ (* -> *) (Domain m) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l, Internal m), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), p (Internal h), p (Internal i), p (Internal j), p (Internal k), p (Internal l), p (Internal m), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l, Internal m), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g), InjectC (:|| Select p) dom (Internal h), InjectC (:|| Select p) dom (Internal i), InjectC (:|| Select p) dom (Internal j), InjectC (:|| Select p) dom (Internal k), InjectC (:|| Select p) dom (Internal l), InjectC (:|| Select p) dom (Internal m)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, Syntactic l, ~ (* -> *) (Domain l) dom, Syntactic m, ~ (* -> *) (Domain m) dom, Syntactic n, ~ (* -> *) (Domain n) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l, Internal m, Internal n), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f), InjectC Select dom (Internal g), InjectC Select dom (Internal h), InjectC Select dom (Internal i), InjectC Select dom (Internal j), InjectC Select dom (Internal k), InjectC Select dom (Internal l), InjectC Select dom (Internal m), InjectC Select dom (Internal n)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, Syntactic l, ~ (* -> *) (Domain l) dom, Syntactic m, ~ (* -> *) (Domain m) dom, Syntactic n, ~ (* -> *) (Domain n) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l, Internal m, Internal n), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), p (Internal h), p (Internal i), p (Internal j), p (Internal k), p (Internal l), p (Internal m), p (Internal n), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l, Internal m, Internal n), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g), InjectC (:|| Select p) dom (Internal h), InjectC (:|| Select p) dom (Internal i), InjectC (:|| Select p) dom (Internal j), InjectC (:|| Select p) dom (Internal k), InjectC (:|| Select p) dom (Internal l), InjectC (:|| Select p) dom (Internal m), InjectC (:|| Select p) dom (Internal n)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, Syntactic l, ~ (* -> *) (Domain l) dom, Syntactic m, ~ (* -> *) (Domain m) dom, Syntactic n, ~ (* -> *) (Domain n) dom, Syntactic o, ~ (* -> *) (Domain o) dom, InjectC Tuple dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l, Internal m, Internal n, Internal o), InjectC Select dom (Internal a), InjectC Select dom (Internal b), InjectC Select dom (Internal c), InjectC Select dom (Internal d), InjectC Select dom (Internal e), InjectC Select dom (Internal f), InjectC Select dom (Internal g), InjectC Select dom (Internal h), InjectC Select dom (Internal i), InjectC Select dom (Internal j), InjectC Select dom (Internal k), InjectC Select dom (Internal l), InjectC Select dom (Internal m), InjectC Select dom (Internal n), InjectC Select dom (Internal o)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, Syntactic h, ~ (* -> *) (Domain h) dom, Syntactic i, ~ (* -> *) (Domain i) dom, Syntactic j, ~ (* -> *) (Domain j) dom, Syntactic k, ~ (* -> *) (Domain k) dom, Syntactic l, ~ (* -> *) (Domain l) dom, Syntactic m, ~ (* -> *) (Domain m) dom, Syntactic n, ~ (* -> *) (Domain n) dom, Syntactic o, ~ (* -> *) (Domain o) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l, Internal m, Internal n, Internal o), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), p (Internal h), p (Internal i), p (Internal j), p (Internal k), p (Internal l), p (Internal m), p (Internal n), p (Internal o), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g, Internal h, Internal i, Internal j, Internal k, Internal l, Internal m, Internal n, Internal o), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g), InjectC (:|| Select p) dom (Internal h), InjectC (:|| Select p) dom (Internal i), InjectC (:|| Select p) dom (Internal j), InjectC (:|| Select p) dom (Internal k), InjectC (:|| Select p) dom (Internal l), InjectC (:|| Select p) dom (Internal m), InjectC (:|| Select p) dom (Internal n), InjectC (:|| Select p) dom (Internal o)) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 

resugar :: (Syntactic a, Syntactic b, Domain a ~ Domain b, Internal a ~ Internal b) => a -> bSource

Syntactic type casting

class SyntacticN a internal | a -> internal whereSource

N-ary syntactic functions

desugarN has any type of the form:

 desugarN ::
     ( Syntactic a
     , Syntactic b
     , ...
     , Syntactic x
     , Domain a ~ dom
     , Domain b ~ dom
     , ...
     , Domain x ~ dom
     ) => (a -> b -> ... -> x)
       -> (  ASTF dom (Internal a)
          -> ASTF dom (Internal b)
          -> ...
          -> ASTF dom (Internal x)
          )

...and vice versa for sugarN.

Methods

desugarN :: a -> internalSource

sugarN :: internal -> aSource

Instances

(Syntactic a, ~ (* -> *) (Domain a) dom, ~ * ia (AST dom (Full (Internal a)))) => SyntacticN a ia 
(Syntactic a, ~ (* -> *) (Domain a) dom, ~ * ia (Internal a), SyntacticN b ib) => SyntacticN (a -> b) (AST dom (Full ia) -> ib) 

sugarSym :: (sym :<: AST dom, ApplySym sig b dom, SyntacticN c b) => sym sig -> cSource

"Sugared" symbol application

sugarSym has any type of the form:

 sugarSym ::
     ( expr :<: AST dom
     , Syntactic a dom
     , Syntactic b dom
     , ...
     , Syntactic x dom
     ) => expr (Internal a :-> Internal b :-> ... :-> Full (Internal x))
       -> (a -> b -> ... -> x)

sugarSymC :: (InjectC sym (AST dom) (DenResult sig), ApplySym sig b dom, SyntacticN c b) => sym sig -> cSource

"Sugared" symbol application

sugarSymC has any type of the form:

 sugarSymC ::
     ( InjectC expr (AST dom) (Internal x)
     , Syntactic a dom
     , Syntactic b dom
     , ...
     , Syntactic x dom
     ) => expr (Internal a :-> Internal b :-> ... :-> Full (Internal x))
       -> (a -> b -> ... -> x)