grisette-0.11.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2021-2023
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellTrustworthy
LanguageHaskell2010

Grisette.Internal.Core.Data.Class.Function

Description

 
Synopsis

Function operations

class Function f arg ret | f -> arg ret where Source #

Abstraction for function-like types.

Methods

(#) :: f -> arg -> ret infixl 9 Source #

Function application operator.

The operator is not right associated (like ($)). It is left associated, and you can provide many arguments with this operator once at a time.

>>> (+1) # 2
3
>>> (+) # 2 # 3
5

Instances

Instances details
(Function f arg ret, Mergeable f, Mergeable ret) => Function (Union f) arg (Union ret) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Control.Monad.Union

Methods

(#) :: Union f -> arg -> Union ret Source #

(LinkedRep a sa, LinkedRep b sb) => Function (a --> b) sa sb Source # 
Instance details

Defined in Grisette.Internal.SymPrim.GeneralFun

Methods

(#) :: (a --> b) -> sa -> sb Source #

Function (sa -~> sb) sa sb Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymGeneralFun

Methods

(#) :: (sa -~> sb) -> sa -> sb Source #

Function (sa =~> sb) sa sb Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymTabularFun

Methods

(#) :: (sa =~> sb) -> sa -> sb Source #

Eq a => Function (a =-> b) a b Source # 
Instance details

Defined in Grisette.Internal.SymPrim.TabularFun

Methods

(#) :: (a =-> b) -> a -> b Source #

Function (a -> b) a b Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Function

Methods

(#) :: (a -> b) -> a -> b Source #

class Apply uf where Source #

Applying an uninterpreted function.

>>> let f = "f" :: SymInteger =~> SymInteger =~> SymInteger
>>> apply f "a" "b"
(apply (apply f a) b)

Note that for implementation reasons, you can also use apply function on a non-function symbolic value. In this case, the function is treated as an id function.

Associated Types

type FunType uf Source #

Methods

apply :: uf -> FunType uf Source #

Instances

Instances details
Apply AlgReal Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AlgReal

Associated Types

type FunType AlgReal 
Instance details

Defined in Grisette.Internal.SymPrim.AlgReal

Apply FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Associated Types

type FunType FPRoundingMode 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Apply SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymAlgReal

Associated Types

type FunType SymAlgReal 
Instance details

Defined in Grisette.Internal.SymPrim.SymAlgReal

Apply SymBool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBool

Associated Types

type FunType SymBool 
Instance details

Defined in Grisette.Internal.SymPrim.SymBool

Apply SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Apply SymInteger Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymInteger

Associated Types

type FunType SymInteger 
Instance details

Defined in Grisette.Internal.SymPrim.SymInteger

Apply Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Function

Associated Types

type FunType Integer 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Function

Apply Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Function

Associated Types

type FunType Bool 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Function

Methods

apply :: Bool -> FunType Bool Source #

Apply (IntN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Associated Types

type FunType (IntN n) 
Instance details

Defined in Grisette.Internal.SymPrim.BV

type FunType (IntN n) = IntN n

Methods

apply :: IntN n -> FunType (IntN n) Source #

Apply (WordN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Associated Types

type FunType (WordN n) 
Instance details

Defined in Grisette.Internal.SymPrim.BV

type FunType (WordN n) = WordN n

Methods

apply :: WordN n -> FunType (WordN n) Source #

(KnownNat n, 1 <= n) => Apply (SymIntN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

Associated Types

type FunType (SymIntN n) 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

type FunType (SymIntN n) = SymIntN n

Methods

apply :: SymIntN n -> FunType (SymIntN n) Source #

(KnownNat n, 1 <= n) => Apply (SymWordN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

Associated Types

type FunType (SymWordN n) 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

Methods

apply :: SymWordN n -> FunType (SymWordN n) Source #

Apply (FP eb sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Associated Types

type FunType (FP eb sb) 
Instance details

Defined in Grisette.Internal.SymPrim.FP

type FunType (FP eb sb) = FP eb sb

Methods

apply :: FP eb sb -> FunType (FP eb sb) Source #

(Apply st, LinkedRep ca sa, LinkedRep ct st) => Apply (ca --> ct) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.GeneralFun

Associated Types

type FunType (ca --> ct) 
Instance details

Defined in Grisette.Internal.SymPrim.GeneralFun

type FunType (ca --> ct) = SymType ca -> FunType (SymType ct)

Methods

apply :: (ca --> ct) -> FunType (ca --> ct) Source #

ValidFP eb sb => Apply (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Associated Types

type FunType (SymFP eb sb) 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

type FunType (SymFP eb sb) = SymFP eb sb

Methods

apply :: SymFP eb sb -> FunType (SymFP eb sb) Source #

Apply st => Apply (sa -~> st) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymGeneralFun

Associated Types

type FunType (sa -~> st) 
Instance details

Defined in Grisette.Internal.SymPrim.SymGeneralFun

type FunType (sa -~> st) = sa -> FunType st

Methods

apply :: (sa -~> st) -> FunType (sa -~> st) Source #

Apply st => Apply (sa =~> st) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymTabularFun

Associated Types

type FunType (sa =~> st) 
Instance details

Defined in Grisette.Internal.SymPrim.SymTabularFun

type FunType (sa =~> st) = sa -> FunType st

Methods

apply :: (sa =~> st) -> FunType (sa =~> st) Source #

(Apply t, Eq a) => Apply (a =-> t) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.TabularFun

Associated Types

type FunType (a =-> t) 
Instance details

Defined in Grisette.Internal.SymPrim.TabularFun

type FunType (a =-> t) = a -> FunType t

Methods

apply :: (a =-> t) -> FunType (a =-> t) Source #

Apply b => Apply (a -> b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Function

Associated Types

type FunType (a -> b) 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Function

type FunType (a -> b) = a -> FunType b

Methods

apply :: (a -> b) -> FunType (a -> b) Source #