From 4f6050069c69ac7fbb3f6b0949d55767c7678517 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sun, 22 Mar 2009 18:26:14 +0000 Subject: [PATCH] Moved isMobileType into the Types module where it belongs --- backends/GenerateC.hs | 5 ----- common/Types.hs | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backends/GenerateC.hs b/backends/GenerateC.hs index cbabe7c..2d6fe91 100644 --- a/backends/GenerateC.hs +++ b/backends/GenerateC.hs @@ -1594,11 +1594,6 @@ cgenAssign m _ _ = call genMissing "Cannot perform assignment with multiple dest isPOD :: A.Type -> Bool isPOD = isJust . cgetScalarType -isMobileType :: A.Type -> CGen Bool -isMobileType (A.Mobile {}) = return True -isMobileType t@(A.Record n) = recordAttr (A.nameMeta n) t >>* A.mobileRecord -isMobileType _ = return False - --}}} --{{{ input cgenInput :: A.Variable -> A.InputMode -> CGen () diff --git a/common/Types.hs b/common/Types.hs index de77839..77723a4 100644 --- a/common/Types.hs +++ b/common/Types.hs @@ -20,7 +20,7 @@ with this program. If not, see . module Types ( specTypeOfName, typeOfSpec, typeOfSpec', abbrevModeOfName, underlyingType, stripArrayType, abbrevModeOfVariable, abbrevModeOfSpec - , isRealType, isIntegerType, isNumericType, isCaseableType, isScalarType, isDataType, isCommunicableType, isSequenceType + , isRealType, isIntegerType, isNumericType, isCaseableType, isScalarType, isDataType, isCommunicableType, isSequenceType, isMobileType , resolveUserType, isSafeConversion, isPreciseConversion, isImplicitConversionRain , returnTypesOfFunction , BytesInResult(..), bytesInType, countReplicator, countStructured, computeStructured @@ -599,6 +599,11 @@ isSequenceType (A.Array _ _) = True isSequenceType (A.List _) = True isSequenceType _ = False +isMobileType :: (CSMR m, Die m) => A.Type -> m Bool +isMobileType (A.Mobile {}) = return True +isMobileType t@(A.Record n) = recordAttr (A.nameMeta n) t >>* A.mobileRecord +isMobileType _ = return False + --}}} --{{{ sizes of types