hydra-kernel-0.18.1: src/main/haskell/Hydra/Core/Dsl/Reduction.hs
-- Note: this is an automatically generated file. Do not edit.
-- | DSL functions for hydra.core.reduction
module Hydra.Core.Dsl.Reduction where
import qualified Hydra.Core.Annotations as Annotations
import qualified Hydra.Core.Arity as Arity
import qualified Hydra.Core.Checking as Checking
import qualified Hydra.Core.Dsl.Annotations as DslAnnotations
import qualified Hydra.Core.Dsl.Arity as DslArity
import qualified Hydra.Core.Dsl.Checking as DslChecking
import qualified Hydra.Core.Dsl.Errors as DslErrors
import qualified Hydra.Core.Dsl.Graph as DslGraph
import qualified Hydra.Core.Dsl.Lexical as DslLexical
import qualified Hydra.Core.Dsl.Lib.Eithers as Eithers
import qualified Hydra.Core.Dsl.Lib.Equality as Equality
import qualified Hydra.Core.Dsl.Lib.Lists as LibLists
import qualified Hydra.Core.Dsl.Lib.Literals as Literals
import qualified Hydra.Core.Dsl.Lib.Logic as Logic
import qualified Hydra.Core.Dsl.Lib.Maps as Maps
import qualified Hydra.Core.Dsl.Lib.Math as Math
import qualified Hydra.Core.Dsl.Lib.Optionals as Optionals
import qualified Hydra.Core.Dsl.Lib.Ordering as Ordering
import qualified Hydra.Core.Dsl.Lib.Pairs as Pairs
import qualified Hydra.Core.Dsl.Lib.Sets as Sets
import qualified Hydra.Core.Dsl.Lib.Strings as Strings
import qualified Hydra.Core.Dsl.Model as DslModel
import qualified Hydra.Core.Dsl.Packaging as DslPackaging
import qualified Hydra.Core.Dsl.Resolution as DslResolution
import qualified Hydra.Core.Dsl.Rewriting as DslRewriting
import qualified Hydra.Core.Dsl.Scoping as DslScoping
import qualified Hydra.Core.Dsl.Strip as DslStrip
import qualified Hydra.Core.Dsl.Variables as DslVariables
import qualified Hydra.Core.Encode.Model as EncodeModel
import qualified Hydra.Core.Errors as Errors
import qualified Hydra.Core.Extract.Model as ExtractModel
import qualified Hydra.Core.Graph as Graph
import qualified Hydra.Core.Lexical as Lexical
import qualified Hydra.Core.Overlay.Haskell.Lib.Lists as Lists
import qualified Hydra.Core.Model as Model
import qualified Hydra.Core.Packaging as Packaging
import qualified Hydra.Core.Print.Errors as PrintErrors
import qualified Hydra.Core.Reduction as Reduction
import qualified Hydra.Core.Resolution as Resolution
import qualified Hydra.Core.Rewriting as Rewriting
import qualified Hydra.Core.Scoping as Scoping
import qualified Hydra.Core.Strip as Strip
import qualified Hydra.Core.Typed as Typed
import qualified Hydra.Core.Typing as Typing
import qualified Hydra.Core.Variables as Variables
import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, lines, map, pure, sum, unlines)
import qualified Data.Scientific as Sci
import Data.Void
-- | DSL reference to hydra.core.reduction.alphaConvert
alphaConvert :: Typed.TypedTerm Model.Name -> Typed.TypedTerm Model.Name -> Typed.TypedTerm Model.Term -> Typed.TypedTerm Model.Term
alphaConvert arg0 arg1 arg2 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.alphaConvert")),
Model.applicationArgument = (Typed.unTypedTerm arg0)})),
Model.applicationArgument = (Typed.unTypedTerm arg1)})),
Model.applicationArgument = (Typed.unTypedTerm arg2)}))
-- | DSL reference to hydra.core.reduction.betaReduceType
betaReduceType :: Typed.TypedTerm t0 -> Typed.TypedTerm Graph.Graph -> Typed.TypedTerm Model.Type -> Typed.TypedTerm (Either Errors.Error Model.Type)
betaReduceType arg0 arg1 arg2 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.betaReduceType")),
Model.applicationArgument = (Typed.unTypedTerm arg0)})),
Model.applicationArgument = (Typed.unTypedTerm arg1)})),
Model.applicationArgument = (Typed.unTypedTerm arg2)}))
-- | DSL reference to hydra.core.reduction.contractTerm
contractTerm :: Typed.TypedTerm Model.Term -> Typed.TypedTerm Model.Term
contractTerm arg0 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.contractTerm")),
Model.applicationArgument = (Typed.unTypedTerm arg0)}))
-- | DSL reference to hydra.core.reduction.countPrimitiveInvocations
countPrimitiveInvocations :: Typed.TypedTerm Bool
countPrimitiveInvocations =
Typed.TypedTerm (Model.TermVariable (Model.Name "hydra.core.reduction.countPrimitiveInvocations"))
-- | DSL reference to hydra.core.reduction.etaExpandTerm
etaExpandTerm :: Typed.TypedTerm Graph.Graph -> Typed.TypedTerm Model.Term -> Typed.TypedTerm Model.Term
etaExpandTerm arg0 arg1 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.etaExpandTerm")),
Model.applicationArgument = (Typed.unTypedTerm arg0)})),
Model.applicationArgument = (Typed.unTypedTerm arg1)}))
-- | DSL reference to hydra.core.reduction.etaExpandTypedTerm
etaExpandTypedTerm :: Typed.TypedTerm Typing.InferenceContext -> Typed.TypedTerm Graph.Graph -> Typed.TypedTerm Model.Term -> Typed.TypedTerm (Either Errors.Error Model.Term)
etaExpandTypedTerm arg0 arg1 arg2 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.etaExpandTypedTerm")),
Model.applicationArgument = (Typed.unTypedTerm arg0)})),
Model.applicationArgument = (Typed.unTypedTerm arg1)})),
Model.applicationArgument = (Typed.unTypedTerm arg2)}))
-- | DSL reference to hydra.core.reduction.etaExpansionArity
etaExpansionArity :: Typed.TypedTerm Graph.Graph -> Typed.TypedTerm Model.Term -> Typed.TypedTerm Int
etaExpansionArity arg0 arg1 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.etaExpansionArity")),
Model.applicationArgument = (Typed.unTypedTerm arg0)})),
Model.applicationArgument = (Typed.unTypedTerm arg1)}))
-- | DSL reference to hydra.core.reduction.etaReduceTerm
etaReduceTerm :: Typed.TypedTerm Model.Term -> Typed.TypedTerm Model.Term
etaReduceTerm arg0 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.etaReduceTerm")),
Model.applicationArgument = (Typed.unTypedTerm arg0)}))
-- | DSL reference to hydra.core.reduction.reduceTerm
reduceTerm :: Typed.TypedTerm t0 -> Typed.TypedTerm Graph.Graph -> Typed.TypedTerm Bool -> Typed.TypedTerm Model.Term -> Typed.TypedTerm (Either Errors.Error Model.Term)
reduceTerm arg0 arg1 arg2 arg3 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.reduceTerm")),
Model.applicationArgument = (Typed.unTypedTerm arg0)})),
Model.applicationArgument = (Typed.unTypedTerm arg1)})),
Model.applicationArgument = (Typed.unTypedTerm arg2)})),
Model.applicationArgument = (Typed.unTypedTerm arg3)}))
-- | DSL reference to hydra.core.reduction.termIsClosed
termIsClosed :: Typed.TypedTerm Model.Term -> Typed.TypedTerm Bool
termIsClosed arg0 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.termIsClosed")),
Model.applicationArgument = (Typed.unTypedTerm arg0)}))
-- | DSL reference to hydra.core.reduction.termIsValue
termIsValue :: Typed.TypedTerm Model.Term -> Typed.TypedTerm Bool
termIsValue arg0 =
Typed.TypedTerm (Model.TermApplication (Model.Application {
Model.applicationFunction = (Model.TermVariable (Model.Name "hydra.core.reduction.termIsValue")),
Model.applicationArgument = (Typed.unTypedTerm arg0)}))