Added a subExprs helper function to match the rest

This commit is contained in:
Neil Brown 2008-03-19 17:52:01 +00:00
parent b496912c51
commit 713b5c3e5c

View File

@ -24,7 +24,8 @@ module Types
, returnTypesOfFunction
, 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
, recordFields, protocolItems
@ -594,6 +595,11 @@ addExprs :: A.Expression -> A.Expression -> A.Expression
addExprs a b = A.Dyadic m A.Add a b
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.
mulExprs :: A.Expression -> A.Expression -> A.Expression
mulExprs a b = A.Dyadic m A.Mul a b