| Copyright | (c) Sirui Lu 2021-2023 |
|---|---|
| License | BSD-3-Clause (see the LICENSE file) |
| Maintainer | siruilu@cs.washington.edu |
| Stability | Experimental |
| Portability | GHC only |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Grisette.Internal.Core.Data.Class.Function
Contents
Description
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) # 23
>>>(+) # 2 # 35
Instances
| Function a arg res => Function (AsKey a) arg res Source # | |
Defined in Grisette.Internal.Core.Data.Class.AsKey | |
| (Function f arg ret, Mergeable f, Mergeable ret) => Function (Union f) arg (Union ret) Source # | |
| (LinkedRep a sa, LinkedRep b sb) => Function (a --> b) sa sb Source # | |
Defined in Grisette.Internal.SymPrim.GeneralFun | |
| Function (sa -~> sb) sa sb Source # | |
Defined in Grisette.Internal.SymPrim.SymGeneralFun | |
| Function (sa =~> sb) sa sb Source # | |
Defined in Grisette.Internal.SymPrim.SymTabularFun | |
| Eq a => Function (a =-> b) a b Source # | |
Defined in Grisette.Internal.SymPrim.TabularFun | |
| Function (a -> b) a b Source # | |
Defined in Grisette.Internal.Core.Data.Class.Function | |
| Function (f a) arg (f res) => Function (AsKey1 f a) arg (AsKey1 f res) 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.