Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- knownCon ∷ ∀ tyname name uni fun a. (HasUnique name TermUnique, HasUnique tyname TypeUnique, Eq name) ⇒ Term tyname name uni fun a → Term tyname name uni fun a
- knownConPass ∷ ∀ m uni fun a. (Typecheckable uni fun, GEq uni, Ord a, Applicative m) ⇒ PirTCConfig uni fun → Pass m TyName Name uni fun a
- knownConPassSC ∷ ∀ m uni fun a. (Typecheckable uni fun, GEq uni, Ord a, MonadQuote m) ⇒ PirTCConfig uni fun → Pass m TyName Name uni fun a
Documentation
knownCon ∷ ∀ tyname name uni fun a. (HasUnique name TermUnique, HasUnique tyname TypeUnique, Eq name) ⇒ Term tyname name uni fun a → Term tyname name uni fun a Source #
Simplify destructor applications, if the scrutinee is a constructor application.
As an example, given
Maybe_match {x_type} (Just {x_type} x) {result_type} (a -> : result_type) (: result_type) additional_args
knownCon
turns it into
(a -> just_case_body) x additional_args
knownConPass ∷ ∀ m uni fun a. (Typecheckable uni fun, GEq uni, Ord a, Applicative m) ⇒ PirTCConfig uni fun → Pass m TyName Name uni fun a Source #
knownConPassSC ∷ ∀ m uni fun a. (Typecheckable uni fun, GEq uni, Ord a, MonadQuote m) ⇒ PirTCConfig uni fun → Pass m TyName Name uni fun a Source #