camfort-1.1.2: CamFort - Cambridge Fortran infrastructure
Safe HaskellNone
LanguageHaskell2010

Language.Fortran.Model.Op.Core

Description

Actual Fortran language operators. For expressions over normal Fortran values that are actually representable in Fortran.

+, -, *, /, read array, etc...

Documentation

data CoreOp t a where Source #

Constructors

CoreOp :: Op (Length args) ok -> OpSpec ok args result -> Rec t args -> CoreOp t result 

Instances

Instances details
HFunctor CoreOp Source # 
Instance details

Defined in Language.Fortran.Model.Op.Core

Methods

hmap :: forall t t' (a :: u). (forall (b :: u). t b -> t' b) -> CoreOp t a -> CoreOp t' a

HTraversable CoreOp Source # 
Instance details

Defined in Language.Fortran.Model.Op.Core

Methods

htraverse :: forall f t t' (a :: u). Applicative f => (forall (b :: u). t b -> f (t' b)) -> CoreOp t a -> f (CoreOp t' a)

hsequence :: forall f (t :: u -> Type) (a :: u). Applicative f => CoreOp (Compose f t) a -> f (CoreOp t a)

Pretty2 CoreOp Source # 
Instance details

Defined in Language.Fortran.Model.Op.Core

Methods

pretty2 :: forall (t :: k -> Type) (a :: k1). Pretty1 t => CoreOp t a -> String

prettys2Prec :: forall (t :: k -> Type) (a :: k1). Pretty1 t => Int -> CoreOp t a -> ShowS

MonadEvalFortran r m => HFoldableAt (Compose m HighRepr :: Type -> Type) CoreOp Source # 
Instance details

Defined in Language.Fortran.Model.Op.Core

Methods

hfoldMap :: forall t (a :: k). (forall (b :: k). t b -> Compose m HighRepr b) -> CoreOp t a -> Compose m HighRepr a

MonadEvalFortran r m => HFoldableAt (Compose m CoreRepr :: Type -> Type) CoreOp Source # 
Instance details

Defined in Language.Fortran.Model.Op.Core

Methods

hfoldMap :: forall t (a :: k). (forall (b :: k). t b -> Compose m CoreRepr b) -> CoreOp t a -> Compose m CoreRepr a

data Op n ok where Source #

Constructors

OpLit :: Op 0 'OKLit 
OpNeg :: Op 1 'OKNum 
OpPos :: Op 1 'OKNum 
OpAdd :: Op 2 'OKNum 
OpSub :: Op 2 'OKNum 
OpMul :: Op 2 'OKNum 
OpDiv :: Op 2 'OKNum 
OpEq :: Op 2 'OKEq 
OpNE :: Op 2 'OKEq 
OpLT :: Op 2 'OKRel 
OpLE :: Op 2 'OKRel 
OpGT :: Op 2 'OKRel 
OpGE :: Op 2 'OKRel 
OpNot :: Op 1 'OKLogical 
OpAnd :: Op 2 'OKLogical 
OpOr :: Op 2 'OKLogical 
OpEquiv :: Op 2 'OKLogical 
OpNotEquiv :: Op 2 'OKLogical 
OpLookup :: Op 2 'OKLookup 
OpDeref :: Op 1 'OKDeref 

data OpKind Source #

Instances

Instances details
Eq OpKind Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

(==) :: OpKind -> OpKind -> Bool #

(/=) :: OpKind -> OpKind -> Bool #

Ord OpKind Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Show OpKind Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

SingKind OpKind Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Associated Types

type Demote OpKind = (r :: Type)

Methods

fromSing :: forall (a :: OpKind). Sing a -> Demote OpKind

toSing :: Demote OpKind -> SomeSing OpKind

SingI 'OKLit Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

sing :: Sing 'OKLit

SingI 'OKNum Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

sing :: Sing 'OKNum

SingI 'OKEq Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

sing :: Sing 'OKEq

SingI 'OKRel Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

sing :: Sing 'OKRel

SingI 'OKLogical Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

sing :: Sing 'OKLogical

SingI 'OKLookup Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

sing :: Sing 'OKLookup

SingI 'OKDeref Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

sing :: Sing 'OKDeref

SingI 'OKWriteArr Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

sing :: Sing 'OKWriteArr

SingI 'OKWriteData Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

Methods

sing :: Sing 'OKWriteData

type Demote OpKind Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

type Demote OpKind = OpKind
type Sing Source # 
Instance details

Defined in Language.Fortran.Model.Singletons

type Sing = SOpKind

data OpSpec ok args result where Source #

Constructors

OSLit :: Prim p k a -> a -> OpSpec 'OKLit '[] (PrimS a) 
OSNum1 :: NumericBasicType k1 -> Prim p1 k1 a -> Prim p2 k2 b -> OpSpec 'OKNum '[PrimS a] (PrimS b) 
OSNum2 :: NumericBasicType k1 -> NumericBasicType k2 -> Prim p1 k1 a -> Prim p2 k2 b -> Prim (PrecMax p1 p2) (BasicTypeMax k1 k2) c -> OpSpec 'OKNum '[PrimS a, PrimS b] (PrimS c) 
OSLogical1 :: Prim p1 'BTLogical a -> Prim 'P8 'BTLogical b -> OpSpec 'OKLogical '[PrimS a] (PrimS b) 
OSLogical2 :: Prim p1 'BTLogical a -> Prim p2 'BTLogical b -> Prim 'P8 'BTLogical c -> OpSpec 'OKLogical '[PrimS a, PrimS b] (PrimS c) 
OSEq :: ComparableBasicTypes k1 k2 -> Prim p1 k1 a -> Prim p2 k2 b -> Prim 'P8 'BTLogical c -> OpSpec 'OKEq '[PrimS a, PrimS b] (PrimS c) 
OSRel :: ComparableBasicTypes k1 k2 -> Prim p1 k1 a -> Prim p2 k2 b -> Prim 'P8 'BTLogical c -> OpSpec 'OKRel '[PrimS a, PrimS b] (PrimS c) 
OSLookup :: D (Array i v) -> OpSpec 'OKLookup '[Array i v, i] v 
OSDeref :: RElem '(fname, a) fields i => D (Record rname fields) -> SSymbol fname -> OpSpec 'OKDeref '[Record rname fields] a