Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Condition tyname name uni fun a where
- Typechecks ∷ (Typecheckable uni fun, GEq uni) ⇒ PirTCConfig uni fun → Condition TyName Name uni fun a
- GloballyUniqueNames ∷ (HasUnique tyname TypeUnique, HasUnique name TermUnique, Ord a) ⇒ Condition tyname name uni fun a
- Custom ∷ (Term tyname name uni fun a → Maybe (a, Text)) → Condition tyname name uni fun a
- data BiCondition tyname name uni fun a where
- ConstCondition ∷ Condition tyname name uni fun a → BiCondition tyname name uni fun a
- CustomBi ∷ (Term tyname name uni fun a → Term tyname name uni fun a → Maybe (a, Text)) → BiCondition tyname name uni fun a
- checkCondition ∷ MonadError (Error uni fun a) m ⇒ Condition tyname name uni fun a → Term tyname name uni fun a → m ()
- checkBiCondition ∷ MonadError (Error uni fun a) m ⇒ BiCondition tyname name uni fun a → Term tyname name uni fun a → Term tyname name uni fun a → m ()
- data Pass m tyname name uni fun a
- hoistPass ∷ (∀ v. m v → n v) → Pass m tyname name uni fun a → Pass n tyname name uni fun a
- runPass ∷ Monad m ⇒ (String → m ()) → Bool → Pass m tyname name uni fun a → Term tyname name uni fun a → ExceptT (Error uni fun a) m (Term tyname name uni fun a)
- simplePass ∷ (Typecheckable uni fun, GEq uni, Applicative m) ⇒ String → PirTCConfig uni fun → (Term TyName Name uni fun a → Term TyName Name uni fun a) → Pass m TyName Name uni fun a
- renamePass ∷ (HasUnique name TermUnique, HasUnique tyname TypeUnique, MonadQuote m, Ord a) ⇒ Pass m tyname name uni fun a
- typecheckPass ∷ (MonadTypeCheckPir err uni fun a m, Ord a) ⇒ PirTCConfig uni fun → Pass m TyName Name uni fun a
Documentation
data Condition tyname name uni fun a where Source #
A condition on a Term
.
Typechecks ∷ (Typecheckable uni fun, GEq uni) ⇒ PirTCConfig uni fun → Condition TyName Name uni fun a | The |
GloballyUniqueNames ∷ (HasUnique tyname TypeUnique, HasUnique name TermUnique, Ord a) ⇒ Condition tyname name uni fun a | The |
Custom ∷ (Term tyname name uni fun a → Maybe (a, Text)) → Condition tyname name uni fun a | A custom condition. |
data BiCondition tyname name uni fun a where Source #
A condition on a pair of Term
s.
ConstCondition ∷ Condition tyname name uni fun a → BiCondition tyname name uni fun a | A condition on the second |
CustomBi ∷ (Term tyname name uni fun a → Term tyname name uni fun a → Maybe (a, Text)) → BiCondition tyname name uni fun a | A custom condition. |
checkCondition ∷ MonadError (Error uni fun a) m ⇒ Condition tyname name uni fun a → Term tyname name uni fun a → m () Source #
checkBiCondition ∷ MonadError (Error uni fun a) m ⇒ BiCondition tyname name uni fun a → Term tyname name uni fun a → Term tyname name uni fun a → m () Source #
data Pass m tyname name uni fun a Source #
A pass over a term, with pre- and post-conditions.
Pass (Term tyname name uni fun a → m (Term tyname name uni fun a)) [Condition tyname name uni fun a] [BiCondition tyname name uni fun a] | A basic pass. Has a function, which is the pass itself, a set of pre-conditions which are run on the input term, and a set of post-conditions which are run on the input and output terms (so can compare them). |
CompoundPass (Pass m tyname name uni fun a) (Pass m tyname name uni fun a) | |
NoOpPass | |
NamedPass String (Pass m tyname name uni fun a) |
runPass ∷ Monad m ⇒ (String → m ()) → Bool → Pass m tyname name uni fun a → Term tyname name uni fun a → ExceptT (Error uni fun a) m (Term tyname name uni fun a) Source #
simplePass ∷ (Typecheckable uni fun, GEq uni, Applicative m) ⇒ String → PirTCConfig uni fun → (Term TyName Name uni fun a → Term TyName Name uni fun a) → Pass m TyName Name uni fun a Source #
A simple, non-monadic pass that should typecheck.
renamePass ∷ (HasUnique name TermUnique, HasUnique tyname TypeUnique, MonadQuote m, Ord a) ⇒ Pass m tyname name uni fun a Source #
A pass that does renaming.
typecheckPass ∷ (MonadTypeCheckPir err uni fun a m, Ord a) ⇒ PirTCConfig uni fun → Pass m TyName Name uni fun a Source #
A pass that does typechecking, useful when you want to do it explicitly and not as part of a precondition check.