disco-0.1.5: Functional programming language for teaching discrete math.
Copyrightdisco team and contributors
Maintainerbyorgey@gmail.com
Safe HaskellNone
LanguageHaskell2010

Disco.AST.Generic

Description

Abstract syntax trees representing the generic syntax of the Disco language. Concrete AST instances may use this module as a template.

For more detail on the approach used here, see

Najd and Peyton Jones, "Trees that Grow". Journal of Universal Computer Science, vol. 23 no. 1 (2017), 42-62. https://arxiv.org/abs/1610.04799

Essentially, we define a basic generic Term_ type, with a type index to indicate what kind of term it is, i.e. what phase the term belongs to. Each constructor has a type family used to define any extra data that should go in the constructor for a particular phase; there is also one additional constructor which can be used to store arbitrary additional information, again governed by a type family. Together with the use of pattern synonyms, the result is that it looks like we have a different type for each phase, each with its own set of constructors, but in fact all use the same underlying type. Particular instantiations of the generic framework here can be found in Disco.AST.Surface, Disco.AST.Typed, and Disco.AST.Desugared.

Synopsis

Telescopes

data Telescope b where Source #

A telescope is essentially a list, except that each item can bind names in the rest of the list.

Constructors

TelEmpty :: Telescope b

The empty telescope.

TelCons :: Rebind b (Telescope b) -> Telescope b

A binder of type b followed by zero or more b's. This b can bind variables in the subsequent b's.

Instances

Instances details
Pretty Branch Source #

Pretty-print a single branch in a case expression.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Branch -> Sem r Doc Source #

HasType ABranch Source # 
Instance details

Defined in Disco.AST.Typed

Subst t b => Subst t (Telescope b) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

isvar :: Telescope b -> Maybe (SubstName (Telescope b) t) #

isCoerceVar :: Telescope b -> Maybe (SubstCoerce (Telescope b) t) #

subst :: Name t -> t -> Telescope b -> Telescope b #

substs :: [(Name t, t)] -> Telescope b -> Telescope b #

Data b => Data (Telescope b) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Telescope b -> c (Telescope b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Telescope b) #

toConstr :: Telescope b -> Constr #

dataTypeOf :: Telescope b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Telescope b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Telescope b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Telescope b -> Telescope b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Telescope b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Telescope b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Telescope b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Telescope b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Telescope b -> m (Telescope b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Telescope b -> m (Telescope b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Telescope b -> m (Telescope b) #

Show b => Show (Telescope b) Source # 
Instance details

Defined in Disco.AST.Generic

Generic (Telescope b) Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep (Telescope b) :: Type -> Type #

Methods

from :: Telescope b -> Rep (Telescope b) x #

to :: Rep (Telescope b) x -> Telescope b #

Alpha b => Alpha (Telescope b) Source # 
Instance details

Defined in Disco.AST.Generic

Pretty (Telescope Guard) Source #

Pretty-print the guards in a single branch of a case expression.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Telescope Guard -> Sem r Doc Source #

Pretty (Telescope Qual) Source #

Pretty-print the qualifiers in a comprehension.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Telescope Qual -> Sem r Doc Source #

type Rep (Telescope b) Source # 
Instance details

Defined in Disco.AST.Generic

type Rep (Telescope b) = D1 ('MetaData "Telescope" "Disco.AST.Generic" "disco-0.1.5-Dj6M4uP9IofLLslCWcCyVQ" 'False) (C1 ('MetaCons "TelEmpty" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TelCons" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Rebind b (Telescope b)))))

telCons :: Alpha b => b -> Telescope b -> Telescope b Source #

Add a new item to the beginning of a Telescope.

foldTelescope :: Alpha b => (b -> r -> r) -> r -> Telescope b -> r Source #

Fold a telescope given a combining function and a value to use for the empty telescope. Analogous to foldr for lists.

mapTelescope :: (Alpha a, Alpha b) => (a -> b) -> Telescope a -> Telescope b Source #

Apply a function to every item in a telescope.

traverseTelescope :: (Applicative f, Alpha a, Alpha b) => (a -> f b) -> Telescope a -> f (Telescope b) Source #

Traverse over a telescope.

toTelescope :: Alpha b => [b] -> Telescope b Source #

Convert a list to a telescope.

fromTelescope :: Alpha b => Telescope b -> [b] Source #

Convert a telescope to a list.

Utility types

data Side Source #

Injections into a sum type (inl or inr) have a "side" (L or R).

Constructors

L 
R 

Instances

Instances details
Bounded Side Source # 
Instance details

Defined in Disco.AST.Generic

Enum Side Source # 
Instance details

Defined in Disco.AST.Generic

Methods

succ :: Side -> Side #

pred :: Side -> Side #

toEnum :: Int -> Side #

fromEnum :: Side -> Int #

enumFrom :: Side -> [Side] #

enumFromThen :: Side -> Side -> [Side] #

enumFromTo :: Side -> Side -> [Side] #

enumFromThenTo :: Side -> Side -> Side -> [Side] #

Eq Side Source # 
Instance details

Defined in Disco.AST.Generic

Methods

(==) :: Side -> Side -> Bool #

(/=) :: Side -> Side -> Bool #

Data Side Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Side -> c Side #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Side #

toConstr :: Side -> Constr #

dataTypeOf :: Side -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Side) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Side) #

gmapT :: (forall b. Data b => b -> b) -> Side -> Side #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Side -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Side -> r #

gmapQ :: (forall d. Data d => d -> u) -> Side -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Side -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Side -> m Side #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Side -> m Side #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Side -> m Side #

Ord Side Source # 
Instance details

Defined in Disco.AST.Generic

Methods

compare :: Side -> Side -> Ordering #

(<) :: Side -> Side -> Bool #

(<=) :: Side -> Side -> Bool #

(>) :: Side -> Side -> Bool #

(>=) :: Side -> Side -> Bool #

max :: Side -> Side -> Side #

min :: Side -> Side -> Side #

Show Side Source # 
Instance details

Defined in Disco.AST.Generic

Methods

showsPrec :: Int -> Side -> ShowS #

show :: Side -> String #

showList :: [Side] -> ShowS #

Generic Side Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep Side :: Type -> Type #

Methods

from :: Side -> Rep Side x #

to :: Rep Side x -> Side #

Alpha Side Source # 
Instance details

Defined in Disco.AST.Generic

Pretty Side Source # 
Instance details

Defined in Disco.AST.Generic

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Side -> Sem r Doc Source #

Subst t Side Source # 
Instance details

Defined in Disco.AST.Generic

Methods

isvar :: Side -> Maybe (SubstName Side t) #

isCoerceVar :: Side -> Maybe (SubstCoerce Side t) #

subst :: Name t -> t -> Side -> Side #

substs :: [(Name t, t)] -> Side -> Side #

type Rep Side Source # 
Instance details

Defined in Disco.AST.Generic

type Rep Side = D1 ('MetaData "Side" "Disco.AST.Generic" "disco-0.1.5-Dj6M4uP9IofLLslCWcCyVQ" 'False) (C1 ('MetaCons "L" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "R" 'PrefixI 'False) (U1 :: Type -> Type))

selectSide :: Side -> a -> a -> a Source #

Use a Side to select one of two arguments (the first argument for L, and the second for R).

fromSide :: Side -> Bool Source #

Convert a Side to a boolean.

data Container where Source #

An enumeration of the different kinds of containers in disco: lists, bags, and sets.

Instances

Instances details
Enum Container Source # 
Instance details

Defined in Disco.AST.Generic

Eq Container Source # 
Instance details

Defined in Disco.AST.Generic

Data Container Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Container -> c Container #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Container #

toConstr :: Container -> Constr #

dataTypeOf :: Container -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Container) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Container) #

gmapT :: (forall b. Data b => b -> b) -> Container -> Container #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Container -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Container -> r #

gmapQ :: (forall d. Data d => d -> u) -> Container -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Container -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Container -> m Container #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Container -> m Container #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Container -> m Container #

Show Container Source # 
Instance details

Defined in Disco.AST.Generic

Generic Container Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep Container :: Type -> Type #

Alpha Container Source # 
Instance details

Defined in Disco.AST.Generic

Subst t Container Source # 
Instance details

Defined in Disco.AST.Generic

type Rep Container Source # 
Instance details

Defined in Disco.AST.Generic

type Rep Container = D1 ('MetaData "Container" "Disco.AST.Generic" "disco-0.1.5-Dj6M4uP9IofLLslCWcCyVQ" 'False) (C1 ('MetaCons "ListContainer" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BagContainer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SetContainer" 'PrefixI 'False) (U1 :: Type -> Type)))

data Ellipsis t where Source #

An ellipsis is an "omitted" part of a literal container (such as a list or set), of the form .. t. We don't have open-ended ellipses since everything is evaluated eagerly and hence containers must be finite.

Constructors

Until :: t -> Ellipsis t

Until represents an ellipsis with a given endpoint, as in [3 .. 20].

Instances

Instances details
Functor Ellipsis Source # 
Instance details

Defined in Disco.AST.Generic

Methods

fmap :: (a -> b) -> Ellipsis a -> Ellipsis b #

(<$) :: a -> Ellipsis b -> Ellipsis a #

Foldable Ellipsis Source # 
Instance details

Defined in Disco.AST.Generic

Methods

fold :: Monoid m => Ellipsis m -> m #

foldMap :: Monoid m => (a -> m) -> Ellipsis a -> m #

foldMap' :: Monoid m => (a -> m) -> Ellipsis a -> m #

foldr :: (a -> b -> b) -> b -> Ellipsis a -> b #

foldr' :: (a -> b -> b) -> b -> Ellipsis a -> b #

foldl :: (b -> a -> b) -> b -> Ellipsis a -> b #

foldl' :: (b -> a -> b) -> b -> Ellipsis a -> b #

foldr1 :: (a -> a -> a) -> Ellipsis a -> a #

foldl1 :: (a -> a -> a) -> Ellipsis a -> a #

toList :: Ellipsis a -> [a] #

null :: Ellipsis a -> Bool #

length :: Ellipsis a -> Int #

elem :: Eq a => a -> Ellipsis a -> Bool #

maximum :: Ord a => Ellipsis a -> a #

minimum :: Ord a => Ellipsis a -> a #

sum :: Num a => Ellipsis a -> a #

product :: Num a => Ellipsis a -> a #

Traversable Ellipsis Source # 
Instance details

Defined in Disco.AST.Generic

Methods

traverse :: Applicative f => (a -> f b) -> Ellipsis a -> f (Ellipsis b) #

sequenceA :: Applicative f => Ellipsis (f a) -> f (Ellipsis a) #

mapM :: Monad m => (a -> m b) -> Ellipsis a -> m (Ellipsis b) #

sequence :: Monad m => Ellipsis (m a) -> m (Ellipsis a) #

Subst a t => Subst a (Ellipsis t) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

isvar :: Ellipsis t -> Maybe (SubstName (Ellipsis t) a) #

isCoerceVar :: Ellipsis t -> Maybe (SubstCoerce (Ellipsis t) a) #

subst :: Name a -> a -> Ellipsis t -> Ellipsis t #

substs :: [(Name a, a)] -> Ellipsis t -> Ellipsis t #

Data t => Data (Ellipsis t) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ellipsis t -> c (Ellipsis t) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ellipsis t) #

toConstr :: Ellipsis t -> Constr #

dataTypeOf :: Ellipsis t -> DataType #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Ellipsis t)) #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Ellipsis t)) #

gmapT :: (forall b. Data b => b -> b) -> Ellipsis t -> Ellipsis t #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ellipsis t -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ellipsis t -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ellipsis t -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ellipsis t -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ellipsis t -> m (Ellipsis t) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ellipsis t -> m (Ellipsis t) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ellipsis t -> m (Ellipsis t) #

Show t => Show (Ellipsis t) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

showsPrec :: Int -> Ellipsis t -> ShowS #

show :: Ellipsis t -> String #

showList :: [Ellipsis t] -> ShowS #

Generic (Ellipsis t) Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep (Ellipsis t) :: Type -> Type #

Methods

from :: Ellipsis t -> Rep (Ellipsis t) x #

to :: Rep (Ellipsis t) x -> Ellipsis t #

Alpha t => Alpha (Ellipsis t) Source # 
Instance details

Defined in Disco.AST.Generic

type Rep (Ellipsis t) Source # 
Instance details

Defined in Disco.AST.Generic

type Rep (Ellipsis t) = D1 ('MetaData "Ellipsis" "Disco.AST.Generic" "disco-0.1.5-Dj6M4uP9IofLLslCWcCyVQ" 'False) (C1 ('MetaCons "Until" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 t)))

Term

data Term_ e where Source #

The base generic AST representing terms in the disco language. e is a type index indicating the kind of term, i.e. the phase (for example, surface, typed, or desugared). Type families like X_TVar and so on use the phase index to determine what extra information (if any) should be stored in each constructor. For example, in the typed phase many constructors store an extra type, giving the type of the term.

Constructors

TVar_ :: X_TVar e -> Name (Term_ e) -> Term_ e

A term variable.

TPrim_ :: X_TPrim e -> Prim -> Term_ e

A primitive, i.e. a constant which is interpreted specially at runtime. See Disco.Syntax.Prims.

TLet_ :: X_TLet e -> Bind (Telescope (Binding_ e)) (Term_ e) -> Term_ e

A (non-recursive) let expression, let x1 = t1, x2 = t2, ... in t.

TParens_ :: X_TParens e -> Term_ e -> Term_ e

Explicit parentheses. We need to keep track of these in the surface syntax in order to syntactically distinguish multiplication and function application. However, note that these disappear after the surface syntax phase.

TUnit_ :: X_TUnit e -> Term_ e

The unit value, (), of type Unit.

TBool_ :: X_TBool e -> Bool -> Term_ e

A boolean value.

TNat_ :: X_TNat e -> Integer -> Term_ e

A natural number.

TRat_ :: X_TRat e -> Rational -> Term_ e

A nonnegative rational number, parsed as a decimal. (Note syntax like 3/5 does not parse as a rational, but rather as the application of a division operator to two natural numbers.)

TChar_ :: X_TChar e -> Char -> Term_ e

A literal unicode character, e.g. d.

TString_ :: X_TString e -> [Char] -> Term_ e

A string literal, e.g. "disco".

TAbs_ :: Quantifier -> X_TAbs e -> Binder_ e (Term_ e) -> Term_ e

A binding abstraction, of the form Q vars. expr where Q is a quantifier and vars is a list of bound variables and optional type annotations. In particular, this could be a lambda abstraction, i.e. an anonymous function (e.g. x, (y:N). 2x + y), a universal quantifier (forall x, (y:N). x^2 + y > 0), or an existential quantifier (exists x, (y:N). x^2 + y == 0).

TApp_ :: X_TApp e -> Term_ e -> Term_ e -> Term_ e

Function application, t1 t2.

TTup_ :: X_TTup e -> [Term_ e] -> Term_ e

An n-tuple, (t1, ..., tn).

TCase_ :: X_TCase e -> [Branch_ e] -> Term_ e

A case expression.

TChain_ :: X_TChain e -> Term_ e -> [Link_ e] -> Term_ e

A chained comparison, consisting of a term followed by one or more "links", where each link is a comparison operator and another term.

TTyOp_ :: X_TTyOp e -> TyOp -> Type -> Term_ e

An application of a type operator.

TContainer_ :: X_TContainer e -> Container -> [(Term_ e, Maybe (Term_ e))] -> Maybe (Ellipsis (Term_ e)) -> Term_ e

A containter literal (set, bag, or list).

TContainerComp_ :: X_TContainerComp e -> Container -> Bind (Telescope (Qual_ e)) (Term_ e) -> Term_ e

A container comprehension.

TAscr_ :: X_TAscr e -> Term_ e -> PolyType -> Term_ e

Type ascription, (Term_ e : type).

XTerm_ :: X_Term e -> Term_ e

A data constructor with an extension descriptor that a "concrete" implementation of a generic AST may use to carry extra information.

Instances

Instances details
Pretty Branch Source #

Pretty-print a single branch in a case expression.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Branch -> Sem r Doc Source #

Pretty Term Source # 
Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Term -> Sem r Doc Source #

Pretty ATerm Source # 
Instance details

Defined in Disco.AST.Typed

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => ATerm -> Sem r Doc Source #

HasType ABranch Source # 
Instance details

Defined in Disco.AST.Typed

HasType ATerm Source # 
Instance details

Defined in Disco.AST.Typed

HasType DTerm Source # 
Instance details

Defined in Disco.AST.Desugared

(Typeable e, ForallTerm (Subst Type) e, ForallTerm Alpha e) => Subst Type (Term_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

isvar :: Term_ e -> Maybe (SubstName (Term_ e) Type) #

isCoerceVar :: Term_ e -> Maybe (SubstCoerce (Term_ e) Type) #

subst :: Name Type -> Type -> Term_ e -> Term_ e #

substs :: [(Name Type, Type)] -> Term_ e -> Term_ e #

(Data e, Typeable e, ForallTerm Data e) => Data (Term_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Term_ e -> c (Term_ e) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Term_ e) #

toConstr :: Term_ e -> Constr #

dataTypeOf :: Term_ e -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Term_ e)) #

dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (Term_ e)) #

gmapT :: (forall b. Data b => b -> b) -> Term_ e -> Term_ e #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Term_ e -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Term_ e -> r #

gmapQ :: (forall d. Data d => d -> u) -> Term_ e -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Term_ e -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Term_ e -> m (Term_ e) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Term_ e -> m (Term_ e) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Term_ e -> m (Term_ e) #

ForallTerm Show e => Show (Term_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

showsPrec :: Int -> Term_ e -> ShowS #

show :: Term_ e -> String #

showList :: [Term_ e] -> ShowS #

Generic (Term_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep (Term_ e) :: Type -> Type #

Methods

from :: Term_ e -> Rep (Term_ e) x #

to :: Rep (Term_ e) x -> Term_ e #

(Data e, ForallTerm Data e) => Plated (Term_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

plate :: Traversal' (Term_ e) (Term_ e) #

(Typeable e, ForallTerm Alpha e) => Alpha (Term_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Pretty (Name a, Bind [Pattern] Term) Source #

Pretty-print a single clause in a definition.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => (Name a, Bind [Pattern] Term) -> Sem r Doc Source #

type Rep (Term_ e) Source # 
Instance details

Defined in Disco.AST.Generic

type Rep (Term_ e) = D1 ('MetaData "Term_" "Disco.AST.Generic" "disco-0.1.5-Dj6M4uP9IofLLslCWcCyVQ" 'False) ((((C1 ('MetaCons "TVar_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TVar e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Name (Term_ e)))) :+: C1 ('MetaCons "TPrim_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TPrim e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Prim))) :+: (C1 ('MetaCons "TLet_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TLet e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Bind (Telescope (Binding_ e)) (Term_ e)))) :+: (C1 ('MetaCons "TParens_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TParens e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term_ e))) :+: C1 ('MetaCons "TUnit_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TUnit e)))))) :+: ((C1 ('MetaCons "TBool_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TBool e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: C1 ('MetaCons "TNat_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TNat e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))) :+: (C1 ('MetaCons "TRat_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TRat e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational)) :+: (C1 ('MetaCons "TChar_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TChar e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char)) :+: C1 ('MetaCons "TString_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TString e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Char])))))) :+: (((C1 ('MetaCons "TAbs_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Quantifier) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TAbs e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Binder_ e (Term_ e))))) :+: C1 ('MetaCons "TApp_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TApp e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term_ e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term_ e))))) :+: (C1 ('MetaCons "TTup_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TTup e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Term_ e])) :+: (C1 ('MetaCons "TCase_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TCase e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Branch_ e])) :+: C1 ('MetaCons "TChain_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TChain e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term_ e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Link_ e])))))) :+: ((C1 ('MetaCons "TTyOp_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TTyOp e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyOp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))) :+: C1 ('MetaCons "TContainer_" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TContainer e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Container)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Term_ e, Maybe (Term_ e))]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Ellipsis (Term_ e))))))) :+: (C1 ('MetaCons "TContainerComp_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TContainerComp e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Container) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Bind (Telescope (Qual_ e)) (Term_ e))))) :+: (C1 ('MetaCons "TAscr_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_TAscr e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term_ e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PolyType))) :+: C1 ('MetaCons "XTerm_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_Term e))))))))

type family X_TVar e Source #

Instances

Instances details
type X_TVar UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TVar UD = ()

type family X_TPrim e Source #

Instances

Instances details
type X_TPrim UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TPrim UD = ()

type family X_TLet e Source #

Instances

Instances details
type X_TLet UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TLet UD = ()

type family X_TParens e Source #

Instances

Instances details
type X_TParens UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TParens UD = ()

type family X_TUnit e Source #

Instances

Instances details
type X_TUnit UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TUnit UD = ()

type family X_TBool e Source #

Instances

Instances details
type X_TBool UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TBool UD = ()

type family X_TNat e Source #

Instances

Instances details
type X_TNat UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TNat UD = ()

type family X_TRat e Source #

Instances

Instances details
type X_TRat UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TRat UD = ()

type family X_TChar e Source #

Instances

Instances details
type X_TChar UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TChar UD = ()

type family X_TString e Source #

Instances

Instances details
type X_TString UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TString UD = ()

type family X_TAbs e Source #

Instances

Instances details
type X_TAbs UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TAbs UD = ()

type family X_TApp e Source #

Instances

Instances details
type X_TApp UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TApp UD = ()

type family X_TTup e Source #

Instances

Instances details
type X_TTup UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TTup UD = ()

type family X_TCase e Source #

Instances

Instances details
type X_TCase UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TCase UD = ()

type family X_TChain e Source #

Instances

Instances details
type X_TChain UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TChain UD = ()

type family X_TTyOp e Source #

Instances

Instances details
type X_TTyOp UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TTyOp UD = ()

type family X_TContainer e Source #

Instances

Instances details
type X_TContainer UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TContainer UD = ()

type family X_TContainerComp e Source #

Instances

Instances details
type X_TContainerComp UD Source # 
Instance details

Defined in Disco.AST.Surface

type family X_TAscr e Source #

Instances

Instances details
type X_TAscr UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_TAscr UD = ()

type family X_Term e Source #

Instances

Instances details
type X_Term UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_Term UD = ()

type ForallTerm (a :: * -> Constraint) e = (a (X_TVar e), a (X_TPrim e), a (X_TLet e), a (X_TParens e), a (X_TUnit e), a (X_TBool e), a (X_TNat e), a (X_TRat e), a (X_TChar e), a (X_TString e), a (X_TAbs e), a (X_TApp e), a (X_TCase e), a (X_TTup e), a (X_TChain e), a (X_TTyOp e), a (X_TContainer e), a (X_TContainerComp e), a (X_TAscr e), a (X_Term e), a (Qual_ e), a (Guard_ e), a (Link_ e), a (Binding_ e), a (Pattern_ e), a (Binder_ e (Term_ e))) Source #

Link

data Link_ e where Source #

A "link" is a comparison operator and a term; a single term followed by a sequence of links makes up a comparison chain, such as 2 < x < y < 10.

Constructors

TLink_ :: X_TLink e -> BOp -> Term_ e -> Link_ e

Note that although the type of TLink_ says it can hold any BOp, it should really only hold comparison operators.

Instances

type family X_TLink e Source #

Instances

type ForallLink (a :: * -> Constraint) e = (a (X_TLink e), a (Term_ e)) Source #

Qual

data Qual_ e where Source #

A container comprehension consists of a head term and then a list of qualifiers. Each qualifier either binds a variable to some collection or consists of a boolean guard.

Constructors

QBind_ :: X_QBind e -> Name (Term_ e) -> Embed (Term_ e) -> Qual_ e

A binding qualifier (i.e. x in t).

QGuard_ :: X_QGuard e -> Embed (Term_ e) -> Qual_ e

A boolean guard qualfier (i.e. x + y > 4).

Instances

Instances details
Pretty Qual Source #

Pretty-print a single qualifier in a comprehension.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Qual -> Sem r Doc Source #

ForallQual (Subst Type) e => Subst Type (Qual_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

isvar :: Qual_ e -> Maybe (SubstName (Qual_ e) Type) #

isCoerceVar :: Qual_ e -> Maybe (SubstCoerce (Qual_ e) Type) #

subst :: Name Type -> Type -> Qual_ e -> Qual_ e #

substs :: [(Name Type, Type)] -> Qual_ e -> Qual_ e #

(Typeable e, Data e, ForallQual Data e) => Data (Qual_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Qual_ e -> c (Qual_ e) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Qual_ e) #

toConstr :: Qual_ e -> Constr #

dataTypeOf :: Qual_ e -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Qual_ e)) #

dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (Qual_ e)) #

gmapT :: (forall b. Data b => b -> b) -> Qual_ e -> Qual_ e #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Qual_ e -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Qual_ e -> r #

gmapQ :: (forall d. Data d => d -> u) -> Qual_ e -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Qual_ e -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Qual_ e -> m (Qual_ e) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Qual_ e -> m (Qual_ e) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Qual_ e -> m (Qual_ e) #

ForallQual Show e => Show (Qual_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

showsPrec :: Int -> Qual_ e -> ShowS #

show :: Qual_ e -> String #

showList :: [Qual_ e] -> ShowS #

Generic (Qual_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep (Qual_ e) :: Type -> Type #

Methods

from :: Qual_ e -> Rep (Qual_ e) x #

to :: Rep (Qual_ e) x -> Qual_ e #

(Typeable e, ForallQual Alpha e) => Alpha (Qual_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Pretty (Telescope Qual) Source #

Pretty-print the qualifiers in a comprehension.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Telescope Qual -> Sem r Doc Source #

type Rep (Qual_ e) Source # 
Instance details

Defined in Disco.AST.Generic

type family X_QBind e Source #

Instances

Instances details
type X_QBind UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_QBind UD = ()

type family X_QGuard e Source #

Instances

Instances details
type X_QGuard UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_QGuard UD = ()

type ForallQual (a :: * -> Constraint) e = (a (X_QBind e), a (X_QGuard e), a (Term_ e)) Source #

Binding

data Binding_ e Source #

A binding is a name along with its definition, and optionally its type.

Constructors

Binding_ (Maybe (Embed PolyType)) (Name (Term_ e)) (Embed (Term_ e)) 

Instances

Instances details
Pretty Binding Source #

Pretty-print a binding, i.e. a pairing of a name (with optional type annotation) and term.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Binding -> Sem r Doc Source #

Subst Type (Term_ e) => Subst Type (Binding_ e) Source # 
Instance details

Defined in Disco.AST.Generic

(Typeable e, Data e, ForallTerm Data e) => Data (Binding_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Binding_ e -> c (Binding_ e) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Binding_ e) #

toConstr :: Binding_ e -> Constr #

dataTypeOf :: Binding_ e -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Binding_ e)) #

dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (Binding_ e)) #

gmapT :: (forall b. Data b => b -> b) -> Binding_ e -> Binding_ e #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Binding_ e -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Binding_ e -> r #

gmapQ :: (forall d. Data d => d -> u) -> Binding_ e -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Binding_ e -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Binding_ e -> m (Binding_ e) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Binding_ e -> m (Binding_ e) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Binding_ e -> m (Binding_ e) #

ForallTerm Show e => Show (Binding_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

showsPrec :: Int -> Binding_ e -> ShowS #

show :: Binding_ e -> String #

showList :: [Binding_ e] -> ShowS #

Generic (Binding_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep (Binding_ e) :: Type -> Type #

Methods

from :: Binding_ e -> Rep (Binding_ e) x #

to :: Rep (Binding_ e) x -> Binding_ e #

(Typeable e, Show (Binding_ e), Alpha (Term_ e)) => Alpha (Binding_ e) Source # 
Instance details

Defined in Disco.AST.Generic

type Rep (Binding_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Branch

type Branch_ e = Bind (Telescope (Guard_ e)) (Term_ e) Source #

A branch of a case is a list of guards with an accompanying term. The guards scope over the term. Additionally, each guard scopes over subsequent guards.

Guard

data Guard_ e where Source #

Guards in case expressions.

Constructors

GBool_ :: X_GBool e -> Embed (Term_ e) -> Guard_ e

Boolean guard (if test)

GPat_ :: X_GPat e -> Embed (Term_ e) -> Pattern_ e -> Guard_ e

Pattern guard (when term = pat)

GLet_ :: X_GLet e -> Binding_ e -> Guard_ e

Let (let x = term)

Instances

Instances details
Pretty Guard Source # 
Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Guard -> Sem r Doc Source #

Pretty Branch Source #

Pretty-print a single branch in a case expression.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Branch -> Sem r Doc Source #

HasType ABranch Source # 
Instance details

Defined in Disco.AST.Typed

ForallGuard (Subst Type) e => Subst Type (Guard_ e) Source # 
Instance details

Defined in Disco.AST.Generic

(Typeable e, Data e, ForallGuard Data e) => Data (Guard_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Guard_ e -> c (Guard_ e) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Guard_ e) #

toConstr :: Guard_ e -> Constr #

dataTypeOf :: Guard_ e -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Guard_ e)) #

dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (Guard_ e)) #

gmapT :: (forall b. Data b => b -> b) -> Guard_ e -> Guard_ e #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Guard_ e -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Guard_ e -> r #

gmapQ :: (forall d. Data d => d -> u) -> Guard_ e -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Guard_ e -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Guard_ e -> m (Guard_ e) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Guard_ e -> m (Guard_ e) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Guard_ e -> m (Guard_ e) #

ForallGuard Show e => Show (Guard_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

showsPrec :: Int -> Guard_ e -> ShowS #

show :: Guard_ e -> String #

showList :: [Guard_ e] -> ShowS #

Generic (Guard_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep (Guard_ e) :: Type -> Type #

Methods

from :: Guard_ e -> Rep (Guard_ e) x #

to :: Rep (Guard_ e) x -> Guard_ e #

(Typeable e, Show (Guard_ e), ForallGuard Alpha e) => Alpha (Guard_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Pretty (Telescope Guard) Source #

Pretty-print the guards in a single branch of a case expression.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Telescope Guard -> Sem r Doc Source #

type Rep (Guard_ e) Source # 
Instance details

Defined in Disco.AST.Generic

type family X_GBool e Source #

Instances

Instances details
type X_GBool UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_GBool UD = ()

type family X_GPat e Source #

Instances

Instances details
type X_GPat UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_GPat UD = ()

type family X_GLet e Source #

Instances

Instances details
type X_GLet UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_GLet UD = ()

type ForallGuard (a :: * -> Constraint) e = (a (X_GBool e), a (X_GPat e), a (X_GLet e), a (Term_ e), a (Pattern_ e), a (Binding_ e)) Source #

Pattern

data Pattern_ e where Source #

Patterns.

Constructors

PVar_ :: X_PVar e -> Name (Term_ e) -> Pattern_ e

Variable pattern: matches anything and binds the variable.

PWild_ :: X_PWild e -> Pattern_ e

Wildcard pattern _: matches anything.

PAscr_ :: X_PAscr e -> Pattern_ e -> Type -> Pattern_ e

Type ascription pattern pat : ty.

PUnit_ :: X_PUnit e -> Pattern_ e

Unit pattern (): matches ().

PBool_ :: X_PBool e -> Bool -> Pattern_ e

Literal boolean pattern.

PTup_ :: X_PTup e -> [Pattern_ e] -> Pattern_ e

Tuple pattern (pat1, .. , patn).

PInj_ :: X_PInj e -> Side -> Pattern_ e -> Pattern_ e

Injection pattern (inl pat or inr pat).

PNat_ :: X_PNat e -> Integer -> Pattern_ e

Literal natural number pattern.

PChar_ :: X_PChar e -> Char -> Pattern_ e

Unicode character pattern

PString_ :: X_PString e -> String -> Pattern_ e

String pattern.

PCons_ :: X_PCons e -> Pattern_ e -> Pattern_ e -> Pattern_ e

Cons pattern p1 :: p2.

PList_ :: X_PList e -> [Pattern_ e] -> Pattern_ e

List pattern [p1, .., pn].

PAdd_ :: X_PAdd e -> Side -> Pattern_ e -> Term_ e -> Pattern_ e

Addition pattern, p + t or t + p

PMul_ :: X_PMul e -> Side -> Pattern_ e -> Term_ e -> Pattern_ e

Multiplication pattern, p * t or t * p

PSub_ :: X_PSub e -> Pattern_ e -> Term_ e -> Pattern_ e

Subtraction pattern, p - t

PNeg_ :: X_PNeg e -> Pattern_ e -> Pattern_ e

Negation pattern, -p

PFrac_ :: X_PFrac e -> Pattern_ e -> Pattern_ e -> Pattern_ e

Fraction pattern, p1/p2

XPattern_ :: X_Pattern e -> Pattern_ e

Expansion slot.

Instances

Instances details
Pretty Pattern Source # 
Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => Pattern -> Sem r Doc Source #

HasType APattern Source # 
Instance details

Defined in Disco.AST.Typed

HasType DPattern Source # 
Instance details

Defined in Disco.AST.Desugared

ForallPattern (Subst Type) e => Subst Type (Pattern_ e) Source # 
Instance details

Defined in Disco.AST.Generic

(Typeable e, Data e, ForallPattern Data e) => Data (Pattern_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pattern_ e -> c (Pattern_ e) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Pattern_ e) #

toConstr :: Pattern_ e -> Constr #

dataTypeOf :: Pattern_ e -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Pattern_ e)) #

dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (Pattern_ e)) #

gmapT :: (forall b. Data b => b -> b) -> Pattern_ e -> Pattern_ e #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pattern_ e -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pattern_ e -> r #

gmapQ :: (forall d. Data d => d -> u) -> Pattern_ e -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Pattern_ e -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pattern_ e -> m (Pattern_ e) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pattern_ e -> m (Pattern_ e) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pattern_ e -> m (Pattern_ e) #

ForallPattern Show e => Show (Pattern_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Methods

showsPrec :: Int -> Pattern_ e -> ShowS #

show :: Pattern_ e -> String #

showList :: [Pattern_ e] -> ShowS #

Generic (Pattern_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep (Pattern_ e) :: Type -> Type #

Methods

from :: Pattern_ e -> Rep (Pattern_ e) x #

to :: Rep (Pattern_ e) x -> Pattern_ e #

(Typeable e, Show (Pattern_ e), ForallPattern Alpha e) => Alpha (Pattern_ e) Source # 
Instance details

Defined in Disco.AST.Generic

Pretty (Name a, Bind [Pattern] Term) Source #

Pretty-print a single clause in a definition.

Instance details

Defined in Disco.AST.Surface

Methods

pretty :: forall (r :: EffectRow). Members '[Reader PA, LFresh] r => (Name a, Bind [Pattern] Term) -> Sem r Doc Source #

type Rep (Pattern_ e) Source # 
Instance details

Defined in Disco.AST.Generic

type Rep (Pattern_ e) = D1 ('MetaData "Pattern_" "Disco.AST.Generic" "disco-0.1.5-Dj6M4uP9IofLLslCWcCyVQ" 'False) ((((C1 ('MetaCons "PVar_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PVar e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Name (Term_ e)))) :+: C1 ('MetaCons "PWild_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PWild e)))) :+: (C1 ('MetaCons "PAscr_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PAscr e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))) :+: C1 ('MetaCons "PUnit_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PUnit e))))) :+: ((C1 ('MetaCons "PBool_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PBool e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: C1 ('MetaCons "PTup_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PTup e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Pattern_ e]))) :+: (C1 ('MetaCons "PInj_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PInj e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Side) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e)))) :+: (C1 ('MetaCons "PNat_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PNat e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)) :+: C1 ('MetaCons "PChar_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PChar e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char)))))) :+: (((C1 ('MetaCons "PString_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PString e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "PCons_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PCons e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e))))) :+: (C1 ('MetaCons "PList_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PList e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Pattern_ e])) :+: C1 ('MetaCons "PAdd_" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PAdd e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Side)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term_ e)))))) :+: ((C1 ('MetaCons "PMul_" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PMul e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Side)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term_ e)))) :+: C1 ('MetaCons "PSub_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PSub e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term_ e))))) :+: (C1 ('MetaCons "PNeg_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PNeg e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e))) :+: (C1 ('MetaCons "PFrac_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_PFrac e)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern_ e)))) :+: C1 ('MetaCons "XPattern_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (X_Pattern e))))))))

type family X_PVar e Source #

Instances

Instances details
type X_PVar UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PVar UD = ()

type family X_PWild e Source #

Instances

Instances details
type X_PWild UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PWild UD = ()

type family X_PAscr e Source #

Instances

Instances details
type X_PAscr UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PAscr UD = ()

type family X_PUnit e Source #

Instances

Instances details
type X_PUnit UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PUnit UD = ()

type family X_PBool e Source #

Instances

Instances details
type X_PBool UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PBool UD = ()

type family X_PTup e Source #

Instances

Instances details
type X_PTup UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PTup UD = ()

type family X_PInj e Source #

Instances

Instances details
type X_PInj UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PInj UD = ()

type family X_PNat e Source #

Instances

Instances details
type X_PNat UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PNat UD = ()

type family X_PChar e Source #

Instances

Instances details
type X_PChar UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PChar UD = ()

type family X_PString e Source #

Instances

Instances details
type X_PString UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PString UD = ()

type family X_PCons e Source #

Instances

Instances details
type X_PCons UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PCons UD = ()

type family X_PList e Source #

Instances

Instances details
type X_PList UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PList UD = ()

type family X_PAdd e Source #

Instances

Instances details
type X_PAdd UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PAdd UD = ()

type family X_PMul e Source #

Instances

Instances details
type X_PMul UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PMul UD = ()

type family X_PSub e Source #

Instances

Instances details
type X_PSub UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PSub UD = ()

type family X_PNeg e Source #

Instances

Instances details
type X_PNeg UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PNeg UD = ()

type family X_PFrac e Source #

Instances

Instances details
type X_PFrac UD Source # 
Instance details

Defined in Disco.AST.Surface

type X_PFrac UD = ()

type family X_Pattern e Source #

Instances

Instances details
type X_Pattern UD Source # 
Instance details

Defined in Disco.AST.Surface

type ForallPattern (a :: * -> Constraint) e = (a (X_PVar e), a (X_PWild e), a (X_PAscr e), a (X_PUnit e), a (X_PBool e), a (X_PNat e), a (X_PChar e), a (X_PString e), a (X_PTup e), a (X_PInj e), a (X_PCons e), a (X_PList e), a (X_PAdd e), a (X_PMul e), a (X_PSub e), a (X_PNeg e), a (X_PFrac e), a (X_Pattern e), a (Term_ e)) Source #

Quantifiers

data Quantifier Source #

A quantifier: λ, ∀, or ∃

Constructors

Lam 
Ex 
All 

Instances

Instances details
Eq Quantifier Source # 
Instance details

Defined in Disco.AST.Generic

Data Quantifier Source # 
Instance details

Defined in Disco.AST.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Quantifier -> c Quantifier #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Quantifier #

toConstr :: Quantifier -> Constr #

dataTypeOf :: Quantifier -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Quantifier) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Quantifier) #

gmapT :: (forall b. Data b => b -> b) -> Quantifier -> Quantifier #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Quantifier -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Quantifier -> r #

gmapQ :: (forall d. Data d => d -> u) -> Quantifier -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Quantifier -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Quantifier -> m Quantifier #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Quantifier -> m Quantifier #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Quantifier -> m Quantifier #

Ord Quantifier Source # 
Instance details

Defined in Disco.AST.Generic

Show Quantifier Source # 
Instance details

Defined in Disco.AST.Generic

Generic Quantifier Source # 
Instance details

Defined in Disco.AST.Generic

Associated Types

type Rep Quantifier :: Type -> Type #

Alpha Quantifier Source # 
Instance details

Defined in Disco.AST.Generic

Subst Type Quantifier Source # 
Instance details

Defined in Disco.AST.Generic

type Rep Quantifier Source # 
Instance details

Defined in Disco.AST.Generic

type Rep Quantifier = D1 ('MetaData "Quantifier" "Disco.AST.Generic" "disco-0.1.5-Dj6M4uP9IofLLslCWcCyVQ" 'False) (C1 ('MetaCons "Lam" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Ex" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "All" 'PrefixI 'False) (U1 :: Type -> Type)))

type Binder_ e a = Bind (X_Binder e) a Source #

A binder represents the stuff between the quantifier and the body of a lambda, ∀, or ∃ abstraction, as in x : N, r : F.

type family X_Binder e Source #

A type family specifying what the binder in an abstraction can be. Should have at least variables in it, but how many variables and what other information is carried along may vary.

Instances

Instances details
type X_Binder UD Source # 
Instance details

Defined in Disco.AST.Surface

Property

type Property_ e = Term_ e Source #

A property is just a term (of type Prop).

Orphan instances