grisette-0.12.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 Source #

Apply FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Associated Types

type FunType FPRoundingMode Source #

Apply SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymAlgReal

Associated Types

type FunType SymAlgReal Source #

Apply SymBool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBool

Associated Types

type FunType SymBool Source #

Apply SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Associated Types

type FunType SymFPRoundingMode Source #

Apply SymInteger Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymInteger

Associated Types

type FunType SymInteger Source #

Apply Integer Source # 
Instance details

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

Associated Types

type FunType Integer Source #

Apply Bool Source # 
Instance details

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

Associated Types

type FunType Bool Source #

Methods

apply :: Bool -> FunType Bool Source #

Apply (IntN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Associated Types

type FunType (IntN n) Source #

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) Source #

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) Source #

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) Source #

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) Source #

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) Source #

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) Source #

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) Source #

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) Source #

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) Source #

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) Source #

Methods

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