camfort-0.904: 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 #

Options for the unit solver

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 # 
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

data CompiledUnits Source #

The data-structure stored in 'fortran-src mod files'

Instances

Eq CompiledUnits Source # 
Data CompiledUnits Source # 

Methods

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

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

toConstr :: CompiledUnits -> Constr #

dataTypeOf :: CompiledUnits -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord CompiledUnits Source # 
Show CompiledUnits Source # 
Generic CompiledUnits Source # 

Associated Types

type Rep CompiledUnits :: * -> * #

Binary CompiledUnits Source # 
type Rep CompiledUnits Source # 
type Rep CompiledUnits = D1 (MetaData "CompiledUnits" "Camfort.Specification.Units.Monad" "camfort-0.904-Fd2p4aOxDp58zSsRDqamtC" False) (C1 (MetaCons "CompiledUnits" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "cuTemplateMap") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TemplateMap)) (S1 (MetaSel (Just Symbol "cuNameParamMap") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 NameParamMap))))

type NameParamMap = Map NameParamKey [UnitInfo] Source #

mapped to a list of units (to be multiplied together)

data NameParamKey Source #

Things that can be exported from modules

Constructors

NPKParam PP Int

Function/subroutine name, position of parameter

NPKVariable VV

variable

Instances

Eq NameParamKey Source # 
Data NameParamKey Source # 

Methods

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

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

toConstr :: NameParamKey -> Constr #

dataTypeOf :: NameParamKey -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord NameParamKey Source # 
Show NameParamKey Source # 
Generic NameParamKey Source # 

Associated Types

type Rep NameParamKey :: * -> * #

Binary NameParamKey Source # 
type Rep NameParamKey Source #