Added a subExprs helper function to match the rest
This commit is contained in:
parent
b496912c51
commit
713b5c3e5c
|
@ -24,7 +24,8 @@ module Types
|
||||||
, returnTypesOfFunction
|
, returnTypesOfFunction
|
||||||
, BytesInResult(..), bytesInType, countReplicator, countStructured, computeStructured
|
, BytesInResult(..), bytesInType, countReplicator, countStructured, computeStructured
|
||||||
|
|
||||||
, makeAbbrevAM, makeConstant, makeDimension, addOne, addExprs, mulExprs, divExprs
|
, makeAbbrevAM, makeConstant, makeDimension, addOne, addExprs, subExprs,
|
||||||
|
mulExprs, divExprs
|
||||||
, addDimensions, removeFixedDimensions, trivialSubscriptType, subscriptType, unsubscriptType
|
, addDimensions, removeFixedDimensions, trivialSubscriptType, subscriptType, unsubscriptType
|
||||||
, recordFields, protocolItems
|
, recordFields, protocolItems
|
||||||
|
|
||||||
|
@ -594,6 +595,11 @@ addExprs :: A.Expression -> A.Expression -> A.Expression
|
||||||
addExprs a b = A.Dyadic m A.Add a b
|
addExprs a b = A.Dyadic m A.Add a b
|
||||||
where m = findMeta a
|
where m = findMeta a
|
||||||
|
|
||||||
|
-- | Add two expressions.
|
||||||
|
subExprs :: A.Expression -> A.Expression -> A.Expression
|
||||||
|
subExprs a b = A.Dyadic m A.Subtr a b
|
||||||
|
where m = findMeta a
|
||||||
|
|
||||||
-- | Multiply two expressions.
|
-- | Multiply two expressions.
|
||||||
mulExprs :: A.Expression -> A.Expression -> A.Expression
|
mulExprs :: A.Expression -> A.Expression -> A.Expression
|
||||||
mulExprs a b = A.Dyadic m A.Mul a b
|
mulExprs a b = A.Dyadic m A.Mul a b
|
||||||
|
|
Loading…
Reference in New Issue
Block a user