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

Safe HaskellNone
LanguageHaskell2010

Language.Syntactic.Sugar

Description

"Syntactic sugar"

Synopsis

Documentation

class Syntactic a where Source #

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

Minimal complete definition

desugar, sugar

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) -> a Source #

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) Source # 
Instance details

Defined in Language.Syntactic.Constructs.Binding.HigherOrder

Associated Types

type Domain (a -> b) :: * -> * Source #

type Internal (a -> b) :: * Source #

Methods

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

sugar :: ASTF (Domain (a -> b)) (Internal (a -> b)) -> a -> b Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b) :: * -> * Source #

type Internal (a, b) :: * Source #

Methods

desugar :: (a, b) -> ASTF (Domain (a, b)) (Internal (a, b)) Source #

sugar :: ASTF (Domain (a, b)) (Internal (a, b)) -> (a, b) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.Tuple

Associated Types

type Domain (a, b) :: * -> * Source #

type Internal (a, b) :: * Source #

Methods

desugar :: (a, b) -> ASTF (Domain (a, b)) (Internal (a, b)) Source #

sugar :: ASTF (Domain (a, b)) (Internal (a, b)) -> (a, b) Source #

Syntactic (ASTF dom a) Source # 
Instance details

Defined in Language.Syntactic.Sugar

Associated Types

type Domain (ASTF dom a) :: * -> * Source #

type Internal (ASTF dom a) :: * Source #

Methods

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

sugar :: ASTF (Domain (ASTF dom a)) (Internal (ASTF dom a)) -> ASTF dom a Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c) :: * -> * Source #

type Internal (a, b, c) :: * Source #

Methods

desugar :: (a, b, c) -> ASTF (Domain (a, b, c)) (Internal (a, b, c)) Source #

sugar :: ASTF (Domain (a, b, c)) (Internal (a, b, c)) -> (a, b, c) Source #

(Syntactic a, Domain a ~ dom, IsHODomain dom (Typeable :: * -> Constraint) pVar, InjectC (MONAD m) dom (m (Internal a)), Monad m, Typeable m, Typeable (Internal a), pVar (Internal a)) => Syntactic (Mon dom m a) Source # 
Instance details

Defined in Language.Syntactic.Frontend.Monad

Associated Types

type Domain (Mon dom m a) :: * -> * Source #

type Internal (Mon dom m a) :: * Source #

Methods

desugar :: Mon dom m a -> ASTF (Domain (Mon dom m a)) (Internal (Mon dom m a)) Source #

sugar :: ASTF (Domain (Mon dom m a)) (Internal (Mon dom m a)) -> Mon dom m a Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d) :: * -> * Source #

type Internal (a, b, c, d) :: * Source #

Methods

desugar :: (a, b, c, d) -> ASTF (Domain (a, b, c, d)) (Internal (a, b, c, d)) Source #

sugar :: ASTF (Domain (a, b, c, d)) (Internal (a, b, c, d)) -> (a, b, c, d) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e) :: * -> * Source #

type Internal (a, b, c, d, e) :: * Source #

Methods

desugar :: (a, b, c, d, e) -> ASTF (Domain (a, b, c, d, e)) (Internal (a, b, c, d, e)) Source #

sugar :: ASTF (Domain (a, b, c, d, e)) (Internal (a, b, c, d, e)) -> (a, b, c, d, e) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f) :: * -> * Source #

type Internal (a, b, c, d, e, f) :: * Source #

Methods

desugar :: (a, b, c, d, e, f) -> ASTF (Domain (a, b, c, d, e, f)) (Internal (a, b, c, d, e, f)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f)) (Internal (a, b, c, d, e, f)) -> (a, b, c, d, e, f) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f, g) :: * -> * Source #

type Internal (a, b, c, d, e, f, g) :: * Source #

Methods

desugar :: (a, b, c, d, e, f, g) -> ASTF (Domain (a, b, c, d, e, f, g)) (Internal (a, b, c, d, e, f, g)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f, g)) (Internal (a, b, c, d, e, f, g)) -> (a, b, c, d, e, f, g) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f, g, h) :: * -> * Source #

type Internal (a, b, c, d, e, f, g, h) :: * Source #

Methods

desugar :: (a, b, c, d, e, f, g, h) -> ASTF (Domain (a, b, c, d, e, f, g, h)) (Internal (a, b, c, d, e, f, g, h)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f, g, h)) (Internal (a, b, c, d, e, f, g, h)) -> (a, b, c, d, e, f, g, h) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f, g, h, i) :: * -> * Source #

type Internal (a, b, c, d, e, f, g, h, i) :: * Source #

Methods

desugar :: (a, b, c, d, e, f, g, h, i) -> ASTF (Domain (a, b, c, d, e, f, g, h, i)) (Internal (a, b, c, d, e, f, g, h, i)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i)) (Internal (a, b, c, d, e, f, g, h, i)) -> (a, b, c, d, e, f, g, h, i) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j) :: * -> * Source #

type Internal (a, b, c, d, e, f, g, h, i, j) :: * Source #

Methods

desugar :: (a, b, c, d, e, f, g, h, i, j) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j)) (Internal (a, b, c, d, e, f, g, h, i, j)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j)) (Internal (a, b, c, d, e, f, g, h, i, j)) -> (a, b, c, d, e, f, g, h, i, j) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k) :: * -> * Source #

type Internal (a, b, c, d, e, f, g, h, i, j, k) :: * Source #

Methods

desugar :: (a, b, c, d, e, f, g, h, i, j, k) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k)) (Internal (a, b, c, d, e, f, g, h, i, j, k)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k)) (Internal (a, b, c, d, e, f, g, h, i, j, k)) -> (a, b, c, d, e, f, g, h, i, j, k) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l) :: * -> * Source #

type Internal (a, b, c, d, e, f, g, h, i, j, k, l) :: * Source #

Methods

desugar :: (a, b, c, d, e, f, g, h, i, j, k, l) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l)) -> (a, b, c, d, e, f, g, h, i, j, k, l) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m) :: * -> * Source #

type Internal (a, b, c, d, e, f, g, h, i, j, k, l, m) :: * Source #

Methods

desugar :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m)) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: * -> * Source #

type Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: * Source #

Methods

desugar :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n)) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

(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) Source # 
Instance details

Defined in Language.Syntactic.Frontend.TupleConstrained

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: * -> * Source #

type Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: * Source #

Methods

desugar :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)) Source #

sugar :: ASTF (Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)) (Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

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

Syntactic type casting

class SyntacticN a internal | a -> internal where Source #

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.

Minimal complete definition

desugarN, sugarN

Methods

desugarN :: a -> internal Source #

sugarN :: internal -> a Source #

Instances
(Syntactic a, Domain a ~ dom, ia ~ AST dom (Full (Internal a))) => SyntacticN a ia Source # 
Instance details

Defined in Language.Syntactic.Sugar

Methods

desugarN :: a -> ia Source #

sugarN :: ia -> a Source #

(Syntactic a, Domain a ~ dom, ia ~ Internal a, SyntacticN b ib) => SyntacticN (a -> b) (AST dom (Full ia) -> ib) Source # 
Instance details

Defined in Language.Syntactic.Sugar

Methods

desugarN :: (a -> b) -> AST dom (Full ia) -> ib Source #

sugarN :: (AST dom (Full ia) -> ib) -> a -> b Source #

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

"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 -> c Source #

"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)