camfort-0.901: CamFort - Cambridge Fortran infrastructure

Safe HaskellNone
LanguageHaskell2010

Camfort.Specification.Units.Monad

Description

Defines the monad for the units-of-measure modules

Synopsis

Documentation

type VV = (Name, Name) Source #

A (unique name, source name) variable

data UnitOpts Source #

Constructors

UnitOpts 

Fields

Instances

Eq UnitOpts Source # 
Data UnitOpts Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnitOpts -> c UnitOpts #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnitOpts #

toConstr :: UnitOpts -> Constr #

dataTypeOf :: UnitOpts -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c UnitOpts) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitOpts) #

gmapT :: (forall b. Data b => b -> b) -> UnitOpts -> UnitOpts #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnitOpts -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnitOpts -> r #

gmapQ :: (forall d. Data d => d -> u) -> UnitOpts -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UnitOpts -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnitOpts -> m UnitOpts #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitOpts -> m UnitOpts #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitOpts -> m UnitOpts #

Ord UnitOpts Source # 
Read UnitOpts Source # 
Show UnitOpts Source # 

data UnitState Source #

Working state for the monad

Instances

Data UnitState Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnitState -> c UnitState #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnitState #

toConstr :: UnitState -> Constr #

dataTypeOf :: UnitState -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c UnitState) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnitState) #

gmapT :: (forall b. Data b => b -> b) -> UnitState -> UnitState #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnitState -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnitState -> r #

gmapQ :: (forall d. Data d => d -> u) -> UnitState -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UnitState -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnitState -> m UnitState #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitState -> m UnitState #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnitState -> m UnitState #

Show UnitState Source # 

data LiteralsOpt Source #

Some options about how to handle literals.

Constructors

LitPoly

All literals are polymorphic.

LitUnitless

All literals are unitless.

LitMixed

The literal "0" or "0.0" is fully parametric polymorphic. All other literals are monomorphic, possibly unitless.

Instances

Eq LiteralsOpt Source # 
Data LiteralsOpt Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LiteralsOpt -> c LiteralsOpt #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LiteralsOpt #

toConstr :: LiteralsOpt -> Constr #

dataTypeOf :: LiteralsOpt -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c LiteralsOpt) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LiteralsOpt) #

gmapT :: (forall b. Data b => b -> b) -> LiteralsOpt -> LiteralsOpt #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LiteralsOpt -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LiteralsOpt -> r #

gmapQ :: (forall d. Data d => d -> u) -> LiteralsOpt -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LiteralsOpt -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LiteralsOpt -> m LiteralsOpt #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LiteralsOpt -> m LiteralsOpt #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LiteralsOpt -> m LiteralsOpt #

Ord LiteralsOpt Source # 
Read LiteralsOpt Source # 
Show LiteralsOpt Source # 

whenDebug :: UnitSolver () -> UnitSolver () Source #

Only run the argument if debugging mode enabled.

type VarUnitMap = Map VV UnitInfo Source #

Variable => unit

type GivenVarSet = Set Name Source #

Set of variables given explicit unit annotations

type UnitAliasMap = Map String UnitInfo Source #

Alias name => definition

type TemplateMap = Map Name Constraints Source #

Function/subroutine name -> associated, parametric polymorphic constraints

type CallIdMap = IntMap Int Source #

Map of CallId to CallId