fortran-src-0.15.1: Parsers and analyses for Fortran standards 66, 77, 90, 95 and 2003 (partial).
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Fortran.Repr.Value.Scalar.Logical.Machine

Description

Machine Fortran LOGICAL values.

Fortran compilers usually store LOGICALs as INTEGERs (they former is tied to the latter in the specifications). To more accurately simulate their behaviour, we represent them directly as integers, and simply provide a handful of definitions for using them as booleans.

Synopsis

Documentation

fLogicalToBool :: FInt -> Bool Source #

Retrieve the boolean value stored by a LOGICAL(x).

fLogicalNumericFromBool :: Num a => Bool -> a Source #

Convert a bool to its Fortran machine representation in any numeric type.

consumeFLogicalNumeric :: (Num a, Eq a) => r -> r -> a -> r Source #

Consume some Fortran logical stored using an integer.