Copyright | (c) Galois Inc, 2015 |
---|---|
License | Apache-2 |
Maintainer | jhendrix@galois.com, lcasburn@galois.com |
Safe Haskell | Unsafe |
Language | Haskell98 |
Operations for getting Lean values from functions that must not have side effects.
- tryGetEnum :: Enum a => LeanPartialFn CInt -> a
- tryGetLeanValue :: IsLeanValue a p => LeanPartialFn p -> a
- tryGetLeanMaybeValue :: IsLeanValue a p => LeanPartialFn p -> Maybe a
Documentation
tryGetEnum :: Enum a => LeanPartialFn CInt -> a Source
Try to run a Lean partial function that returns an enum type
Other than allocating a new value or throwing an exception, the function should be pure.
tryGetLeanValue :: IsLeanValue a p => LeanPartialFn p -> a Source
Try to run a Lean partial function that returns a Lean value that will need to be freed.
Other than allocating a new value or exception, the function should be be pure.
tryGetLeanMaybeValue :: IsLeanValue a p => LeanPartialFn p -> Maybe a Source
Try to run a Lean function that may return a Lean value that will need to be freed.
Other than allocating a new value or throwing an exception, the function should be pure.