fortran-vars-0.4.0: Fortran memory model and other static analysis tools.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Fortran.Vars.Eval.Deprecated.Operation

Synopsis

Documentation

valueToExpVal' :: SrcSpan -> Value a -> Either String ExpVal Source #

Given a SrcSpan and the Value in that span either return a String describing the issue or the ExpVal held by that Value.

valueToExpVal :: SrcSpan -> Value a -> ExpVal Source #

Given a SrcSpan and the Value returnthe ExpVal held by that Value or throw an error.

transformEither :: (a -> Either String b) -> Either String a -> Either String b Source #

Given a function that returns an Either and an Either with the Right case as the same type input to the function, return an either by possibly applying the function to the Right value or propagating the Left case

transformEitherList :: ([a] -> Either String b) -> [Either String a] -> Either String b Source #

Given a function that takes a list of arguments of the same type and returns an Either as well as a list of Eithers whose Right cases hold the inputs to the function, apply the function if possible. Otherwise propagate the Left cases

binaryTransformEither :: (a -> a -> Either String b) -> Either String a -> Either String a -> Either String b Source #

Given a function that takes two arguments of the same type and returns an Either as well as two Eithers whose Right cases hold the inputs to the function, apply the function if possible. Otherwise propagate the Left cases

unaryOp' :: UnaryOp -> ExpVal -> Either String ExpVal Source #

Given a UnaryOp and an ExpVal, either return the resulting ExpVal after applying the operation or a String describing why this couldn't be done

unaryOp :: UnaryOp -> ExpVal -> ExpVal Source #

Given a UnaryOp and an ExpVal, either return the resulting ExpVal after applying the operation or throw an error

binaryOp' :: BinaryOp -> ExpVal -> ExpVal -> Either String ExpVal Source #

Given a BinaryOp and two ExpVals, either return the resulting ExpVal after applying the operation or a String describing why this couldn't be done

binaryOp :: BinaryOp -> ExpVal -> ExpVal -> ExpVal Source #

Given a BinaryOp and two ExpVals, either return the resulting ExpVal after applying the operation or throw an error

intrinsicFunctionCall :: String -> [ExpVal] -> Either String ExpVal Source #

Given a string representing a function call and a list of ExpVal values holding inputs to the function, evaluate the function call and return the result in a Right, or propagate the Left case if any of the list elements are Lefts.

nonLogicalToLogical :: ExpVal -> Either String Bool Source #

Given a non-logical ExpVal, convert that value to a logical one or return a String describing why this was impossible.