syntactic-3.8.3: Generic representation and manipulation of abstract syntax
Safe HaskellNone
LanguageHaskell2010

Language.Syntactic.Sugar

Description

"Syntactic sugar"

For details, see "Combining Deep and Shallow Embedding for EDSL" (TFP 2013, https://emilaxelsson.github.io/documents/svenningsson2013combining.pdf).

Synopsis

Documentation

class Syntactic a where Source #

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

Instances

Instances details
(sym ~ Typed s, Syntactic a, Domain a ~ sym, Syntactic b, Domain b ~ sym, BindingT :<: s, Typeable (Internal a), Typeable (Internal b)) => Syntactic (a -> b) Source # 
Instance details

Defined in Language.Syntactic.Sugar.BindingTyped

Associated Types

type Domain (a -> b) :: Type -> Type 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, Binding :<: dom) => Syntactic (a -> b) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Binding

Associated Types

type Domain (a -> b) :: Type -> Type 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, Syntactic b, Typeable (Internal a), Typeable (Internal b), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b) => Syntactic (a, b) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b) :: Type -> Type 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, Syntactic b, Tuple :<: Domain a, Domain a ~ Domain b) => Syntactic (a, b) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b) :: Type -> Type 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 (ASTFull sym a) Source # 
Instance details

Defined in Language.Syntactic.Sugar

Associated Types

type Domain (ASTFull sym a) :: Type -> Type Source #

type Internal (ASTFull sym a) Source #

Methods

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

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

Syntactic (ASTF sym a) Source # 
Instance details

Defined in Language.Syntactic.Sugar

Associated Types

type Domain (ASTF sym a) :: Type -> Type Source #

type Internal (ASTF sym a) Source #

Methods

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

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

(Syntactic a, Syntactic b, Syntactic c, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c) => Syntactic (a, b, c) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c) :: Type -> Type 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, Syntactic b, Syntactic c, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c) => Syntactic (a, b, c) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c) :: Type -> Type 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 #

(sym ~ Typed s, Syntactic a, Domain a ~ sym, BindingT :<: s, MONAD m :<: s, Typeable m, Typeable (Internal a)) => Syntactic (Remon sym m a) Source # 
Instance details

Defined in Language.Syntactic.Sugar.MonadTyped

Associated Types

type Domain (Remon sym m a) :: Type -> Type Source #

type Internal (Remon sym m a) Source #

Methods

desugar :: Remon sym m a -> ASTF (Domain (Remon sym m a)) (Internal (Remon sym m a)) Source #

sugar :: ASTF (Domain (Remon sym m a)) (Internal (Remon sym m a)) -> Remon sym m a Source #

(Syntactic a, Domain a ~ sym, Binding :<: sym, MONAD m :<: sym, Typeable m, Typeable (Internal a)) => Syntactic (Remon sym m a) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Monad

Associated Types

type Domain (Remon sym m a) :: Type -> Type Source #

type Internal (Remon sym m a) Source #

Methods

desugar :: Remon sym m a -> ASTF (Domain (Remon sym m a)) (Internal (Remon sym m a)) Source #

sugar :: ASTF (Domain (Remon sym m a)) (Internal (Remon sym m a)) -> Remon sym m a Source #

(Syntactic a, Syntactic b, Syntactic c, Syntactic d, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d) => Syntactic (a, b, c, d) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d) => Syntactic (a, b, c, d) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e) => Syntactic (a, b, c, d, e) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e) => Syntactic (a, b, c, d, e) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f) => Syntactic (a, b, c, d, e, f) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f) => Syntactic (a, b, c, d, e, f) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Typeable (Internal g), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g) => Syntactic (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f, g) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g) => Syntactic (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f, g) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Typeable (Internal g), Typeable (Internal h), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h) => Syntactic (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f, g, h) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h) => Syntactic (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f, g, h) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Typeable (Internal g), Typeable (Internal h), Typeable (Internal i), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i) => Syntactic (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f, g, h, i) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i) => Syntactic (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f, g, h, i) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Typeable (Internal g), Typeable (Internal h), Typeable (Internal i), Typeable (Internal j), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j) => Syntactic (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j) => Syntactic (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Typeable (Internal g), Typeable (Internal h), Typeable (Internal i), Typeable (Internal j), Typeable (Internal k), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k) => Syntactic (a, b, c, d, e, f, g, h, i, j, k) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k) => Syntactic (a, b, c, d, e, f, g, h, i, j, k) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Typeable (Internal g), Typeable (Internal h), Typeable (Internal i), Typeable (Internal j), Typeable (Internal k), Typeable (Internal l), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Syntactic m, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Typeable (Internal g), Typeable (Internal h), Typeable (Internal i), Typeable (Internal j), Typeable (Internal k), Typeable (Internal l), Typeable (Internal m), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, Domain a ~ Domain m) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Syntactic m, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, Domain a ~ Domain m) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Syntactic m, Syntactic n, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Typeable (Internal g), Typeable (Internal h), Typeable (Internal i), Typeable (Internal j), Typeable (Internal k), Typeable (Internal l), Typeable (Internal m), Typeable (Internal n), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, Domain a ~ Domain m, Domain a ~ Domain n) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Syntactic m, Syntactic n, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, Domain a ~ Domain m, Domain a ~ Domain n) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type -> Type 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, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Syntactic m, Syntactic n, Syntactic o, Typeable (Internal a), Typeable (Internal b), Typeable (Internal c), Typeable (Internal d), Typeable (Internal e), Typeable (Internal f), Typeable (Internal g), Typeable (Internal h), Typeable (Internal i), Typeable (Internal j), Typeable (Internal k), Typeable (Internal l), Typeable (Internal m), Typeable (Internal n), Typeable (Internal o), Tuple :<: sym, Domain a ~ Typed sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, Domain a ~ Domain m, Domain a ~ Domain n, Domain a ~ Domain o) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # 
Instance details

Defined in Language.Syntactic.Sugar.TupleTyped

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type -> Type 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 #

(Syntactic a, Syntactic b, Syntactic c, Syntactic d, Syntactic e, Syntactic f, Syntactic g, Syntactic h, Syntactic i, Syntactic j, Syntactic k, Syntactic l, Syntactic m, Syntactic n, Syntactic o, Tuple :<: sym, Domain a ~ sym, Domain a ~ Domain b, Domain a ~ Domain c, Domain a ~ Domain d, Domain a ~ Domain e, Domain a ~ Domain f, Domain a ~ Domain g, Domain a ~ Domain h, Domain a ~ Domain i, Domain a ~ Domain j, Domain a ~ Domain k, Domain a ~ Domain l, Domain a ~ Domain m, Domain a ~ Domain n, Domain a ~ Domain o) => Syntactic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # 
Instance details

Defined in Language.Syntactic.Sugar.Tuple

Associated Types

type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type -> Type 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 f internal | f -> internal where Source #

N-ary syntactic functions

desugarN has any type of the form:

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

...and vice versa for sugarN.

Methods

desugarN :: f -> internal Source #

sugarN :: internal -> f Source #

Instances

Instances details
(Syntactic f, Domain f ~ sym, fi ~ AST sym (Full (Internal f))) => SyntacticN f fi Source # 
Instance details

Defined in Language.Syntactic.Sugar

Methods

desugarN :: f -> fi Source #

sugarN :: fi -> f Source #

(Syntactic a, Domain a ~ sym, ia ~ Internal a, SyntacticN f fi) => SyntacticN (a -> f) (AST sym (Full ia) -> fi) Source # 
Instance details

Defined in Language.Syntactic.Sugar

Methods

desugarN :: (a -> f) -> AST sym (Full ia) -> fi Source #

sugarN :: (AST sym (Full ia) -> fi) -> a -> f Source #

sugarSym :: (Signature sig, fi ~ SmartFun sup sig, sig ~ SmartSig fi, sup ~ SmartSym fi, SyntacticN f fi, sub :<: sup) => sub sig -> f Source #

"Sugared" symbol application

sugarSym has any type of the form:

sugarSym ::
    ( sub :<: AST sup
    , Syntactic a
    , Syntactic b
    , ...
    , Syntactic x
    , Domain a ~ Domain b ~ ... ~ Domain x
    ) => sub (Internal a :-> Internal b :-> ... :-> Full (Internal x))
      -> (a -> b -> ... -> x)

sugarSymTyped :: (Signature sig, fi ~ SmartFun (Typed sup) sig, sig ~ SmartSig fi, Typed sup ~ SmartSym fi, SyntacticN f fi, sub :<: sup, Typeable (DenResult sig)) => sub sig -> f Source #

"Sugared" symbol application

sugarSymTyped has any type of the form:

sugarSymTyped ::
    ( sub :<: AST (Typed sup)
    , Syntactic a
    , Syntactic b
    , ...
    , Syntactic x
    , Domain a ~ Domain b ~ ... ~ Domain x
    , Typeable (Internal x)
    ) => sub (Internal a :-> Internal b :-> ... :-> Full (Internal x))
      -> (a -> b -> ... -> x)