hydra-kernel-0.17.3: src/main/haskell/Hydra/Dsl/Lib/Math.hs
-- Note: this is an automatically generated file. Do not edit.
-- | DSL functions for hydra.lib.math
module Hydra.Dsl.Lib.Math where
import qualified Hydra.Ast as Ast
import qualified Hydra.Coders as Coders
import qualified Hydra.Core as Core
import qualified Hydra.Docs as Docs
import qualified Hydra.Dsl.Ast as DslAst
import qualified Hydra.Dsl.Coders as DslCoders
import qualified Hydra.Dsl.Core as DslCore
import qualified Hydra.Dsl.Docs as DslDocs
import qualified Hydra.Dsl.Error.Checking as ErrorChecking
import qualified Hydra.Dsl.Error.Core as DslErrorCore
import qualified Hydra.Dsl.Error.File as DslErrorFile
import qualified Hydra.Dsl.Error.Packaging as DslErrorPackaging
import qualified Hydra.Dsl.Error.System as DslErrorSystem
import qualified Hydra.Dsl.Errors as DslErrors
import qualified Hydra.Dsl.File as DslFile
import qualified Hydra.Dsl.Graph as DslGraph
import qualified Hydra.Dsl.Json.Model as JsonModel
import qualified Hydra.Dsl.Packaging as DslPackaging
import qualified Hydra.Dsl.Parsing as DslParsing
import qualified Hydra.Dsl.Paths as DslPaths
import qualified Hydra.Dsl.Query as DslQuery
import qualified Hydra.Dsl.Regex as DslRegex
import qualified Hydra.Dsl.Relational as DslRelational
import qualified Hydra.Dsl.System as DslSystem
import qualified Hydra.Dsl.Tabular as DslTabular
import qualified Hydra.Dsl.Testing as DslTesting
import qualified Hydra.Dsl.Time as DslTime
import qualified Hydra.Dsl.Topology as DslTopology
import qualified Hydra.Dsl.Typing as DslTyping
import qualified Hydra.Dsl.Util as DslUtil
import qualified Hydra.Dsl.Validation as DslValidation
import qualified Hydra.Dsl.Variants as DslVariants
import qualified Hydra.Error.Checking as Checking
import qualified Hydra.Error.Core as ErrorCore
import qualified Hydra.Error.File as ErrorFile
import qualified Hydra.Error.Packaging as ErrorPackaging
import qualified Hydra.Error.System as ErrorSystem
import qualified Hydra.Errors as Errors
import qualified Hydra.File as File
import qualified Hydra.Graph as Graph
import qualified Hydra.Json.Model as Model
import qualified Hydra.Packaging as Packaging
import qualified Hydra.Parsing as Parsing
import qualified Hydra.Paths as Paths
import qualified Hydra.Query as Query
import qualified Hydra.Regex as Regex
import qualified Hydra.Relational as Relational
import qualified Hydra.System as System
import qualified Hydra.Tabular as Tabular
import qualified Hydra.Testing as Testing
import qualified Hydra.Time as Time
import qualified Hydra.Topology as Topology
import qualified Hydra.Typed as Typed
import qualified Hydra.Typing as Typing
import qualified Hydra.Util as Util
import qualified Hydra.Validation as Validation
import qualified Hydra.Variants as Variants
import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
import qualified Data.Scientific as Sci
-- | DSL reference to hydra.lib.math.abs
abs :: Typed.TypedTerm Int -> Typed.TypedTerm Int
abs x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.abs")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.acos
acos :: Typed.TypedTerm Double -> Typed.TypedTerm Double
acos x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acos")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.acosh
acosh :: Typed.TypedTerm Double -> Typed.TypedTerm Double
acosh x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.acosh")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.add
add :: Typed.TypedTerm x -> Typed.TypedTerm x -> Typed.TypedTerm x
add arg0 arg1 =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.add")),
Core.applicationArgument = (Typed.unTypedTerm arg0)})),
Core.applicationArgument = (Typed.unTypedTerm arg1)}))
-- | DSL reference to hydra.lib.math.addFloat64
addFloat64 :: Typed.TypedTerm Double -> Typed.TypedTerm Double -> Typed.TypedTerm Double
addFloat64 x y =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.addFloat64")),
Core.applicationArgument = (Typed.unTypedTerm x)})),
Core.applicationArgument = (Typed.unTypedTerm y)}))
-- | DSL reference to hydra.lib.math.asin
asin :: Typed.TypedTerm Double -> Typed.TypedTerm Double
asin x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asin")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.asinh
asinh :: Typed.TypedTerm Double -> Typed.TypedTerm Double
asinh x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.asinh")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.atan
atan :: Typed.TypedTerm Double -> Typed.TypedTerm Double
atan x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.atan2
atan2 :: Typed.TypedTerm Double -> Typed.TypedTerm Double -> Typed.TypedTerm Double
atan2 y x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atan2")),
Core.applicationArgument = (Typed.unTypedTerm y)})),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.atanh
atanh :: Typed.TypedTerm Double -> Typed.TypedTerm Double
atanh x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.atanh")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.ceiling
ceiling :: Typed.TypedTerm Double -> Typed.TypedTerm Double
ceiling x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.ceiling")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.cos
cos :: Typed.TypedTerm Double -> Typed.TypedTerm Double
cos x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cos")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.cosh
cosh :: Typed.TypedTerm Double -> Typed.TypedTerm Double
cosh x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.cosh")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.div
div :: Typed.TypedTerm Int -> Typed.TypedTerm Int -> Typed.TypedTerm (Maybe Int)
div x y =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.div")),
Core.applicationArgument = (Typed.unTypedTerm x)})),
Core.applicationArgument = (Typed.unTypedTerm y)}))
-- | DSL reference to hydra.lib.math.e
e :: Typed.TypedTerm Double
e = Typed.TypedTerm (Core.TermVariable (Core.Name "hydra.lib.math.e"))
-- | DSL reference to hydra.lib.math.even
even :: Typed.TypedTerm Int -> Typed.TypedTerm Bool
even x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.even")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.exp
exp :: Typed.TypedTerm Double -> Typed.TypedTerm Double
exp x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.exp")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.floor
floor :: Typed.TypedTerm Double -> Typed.TypedTerm Double
floor x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.floor")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.log
log :: Typed.TypedTerm Double -> Typed.TypedTerm Double
log x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.log")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.logBase
logBase :: Typed.TypedTerm Double -> Typed.TypedTerm Double -> Typed.TypedTerm Double
logBase b x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.logBase")),
Core.applicationArgument = (Typed.unTypedTerm b)})),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.mod
mod :: Typed.TypedTerm Int -> Typed.TypedTerm Int -> Typed.TypedTerm (Maybe Int)
mod x y =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mod")),
Core.applicationArgument = (Typed.unTypedTerm x)})),
Core.applicationArgument = (Typed.unTypedTerm y)}))
-- | DSL reference to hydra.lib.math.mul
mul :: Typed.TypedTerm x -> Typed.TypedTerm x -> Typed.TypedTerm x
mul arg0 arg1 =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mul")),
Core.applicationArgument = (Typed.unTypedTerm arg0)})),
Core.applicationArgument = (Typed.unTypedTerm arg1)}))
-- | DSL reference to hydra.lib.math.mulFloat64
mulFloat64 :: Typed.TypedTerm Double -> Typed.TypedTerm Double -> Typed.TypedTerm Double
mulFloat64 x y =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.mulFloat64")),
Core.applicationArgument = (Typed.unTypedTerm x)})),
Core.applicationArgument = (Typed.unTypedTerm y)}))
-- | DSL reference to hydra.lib.math.negate
negate :: Typed.TypedTerm x -> Typed.TypedTerm x
negate arg0 =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negate")),
Core.applicationArgument = (Typed.unTypedTerm arg0)}))
-- | DSL reference to hydra.lib.math.negateFloat64
negateFloat64 :: Typed.TypedTerm Double -> Typed.TypedTerm Double
negateFloat64 x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.negateFloat64")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.odd
odd :: Typed.TypedTerm Int -> Typed.TypedTerm Bool
odd x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.odd")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.pi
pi :: Typed.TypedTerm Double
pi = Typed.TypedTerm (Core.TermVariable (Core.Name "hydra.lib.math.pi"))
-- | DSL reference to hydra.lib.math.pow
pow :: Typed.TypedTerm Double -> Typed.TypedTerm Double -> Typed.TypedTerm Double
pow x y =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.pow")),
Core.applicationArgument = (Typed.unTypedTerm x)})),
Core.applicationArgument = (Typed.unTypedTerm y)}))
-- | DSL reference to hydra.lib.math.range
range :: Typed.TypedTerm Int -> Typed.TypedTerm Int -> Typed.TypedTerm [Int]
range a b =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.range")),
Core.applicationArgument = (Typed.unTypedTerm a)})),
Core.applicationArgument = (Typed.unTypedTerm b)}))
-- | DSL reference to hydra.lib.math.rem
rem :: Typed.TypedTerm Int -> Typed.TypedTerm Int -> Typed.TypedTerm (Maybe Int)
rem x y =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.rem")),
Core.applicationArgument = (Typed.unTypedTerm x)})),
Core.applicationArgument = (Typed.unTypedTerm y)}))
-- | DSL reference to hydra.lib.math.round
round :: Typed.TypedTerm Double -> Typed.TypedTerm Double
round x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.round")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.roundFloat32
roundFloat32 :: Typed.TypedTerm Int -> Typed.TypedTerm Float -> Typed.TypedTerm Float
roundFloat32 n x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat32")),
Core.applicationArgument = (Typed.unTypedTerm n)})),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.roundFloat64
roundFloat64 :: Typed.TypedTerm Int -> Typed.TypedTerm Double -> Typed.TypedTerm Double
roundFloat64 n x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.roundFloat64")),
Core.applicationArgument = (Typed.unTypedTerm n)})),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.signum
signum :: Typed.TypedTerm Int -> Typed.TypedTerm Int
signum x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.signum")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.sin
sin :: Typed.TypedTerm Double -> Typed.TypedTerm Double
sin x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sin")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.sinh
sinh :: Typed.TypedTerm Double -> Typed.TypedTerm Double
sinh x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sinh")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.sqrt
sqrt :: Typed.TypedTerm Double -> Typed.TypedTerm Double
sqrt x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sqrt")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.sub
sub :: Typed.TypedTerm x -> Typed.TypedTerm x -> Typed.TypedTerm x
sub arg0 arg1 =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.sub")),
Core.applicationArgument = (Typed.unTypedTerm arg0)})),
Core.applicationArgument = (Typed.unTypedTerm arg1)}))
-- | DSL reference to hydra.lib.math.subFloat64
subFloat64 :: Typed.TypedTerm Double -> Typed.TypedTerm Double -> Typed.TypedTerm Double
subFloat64 x y =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.subFloat64")),
Core.applicationArgument = (Typed.unTypedTerm x)})),
Core.applicationArgument = (Typed.unTypedTerm y)}))
-- | DSL reference to hydra.lib.math.tan
tan :: Typed.TypedTerm Double -> Typed.TypedTerm Double
tan x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tan")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.tanh
tanh :: Typed.TypedTerm Double -> Typed.TypedTerm Double
tanh x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.tanh")),
Core.applicationArgument = (Typed.unTypedTerm x)}))
-- | DSL reference to hydra.lib.math.truncate
truncate :: Typed.TypedTerm Double -> Typed.TypedTerm Double
truncate x =
Typed.TypedTerm (Core.TermApplication (Core.Application {
Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.math.truncate")),
Core.applicationArgument = (Typed.unTypedTerm x)}))