diff --git a/fco2/EvalConstants.hs b/fco2/EvalConstants.hs index 426e3ce..0a94b3b 100644 --- a/fco2/EvalConstants.hs +++ b/fco2/EvalConstants.hs @@ -58,6 +58,8 @@ simplifyExpression ps e --{{{ expression evaluator evalLiteral :: A.Expression -> EvalM OccValue +evalLiteral (A.Literal _ _ (A.ArrayLiteral _ [])) + = throwError "empty array" evalLiteral (A.Literal _ _ (A.ArrayLiteral _ aes)) = liftM OccArray (mapM evalLiteralArray aes) evalLiteral l = evalSimpleLiteral l diff --git a/fco2/Types.hs b/fco2/Types.hs index 905cda7..a7d6b83 100644 --- a/fco2/Types.hs +++ b/fco2/Types.hs @@ -316,6 +316,7 @@ data BytesInResult = BIJust Int -- ^ Just that many bytes. | BIOneFree Int Int -- ^ An array type; A bytes, times unknown dimension B. | BIUnknown -- ^ No idea. + deriving (Show, Eq) -- | Return the size in bytes of a data type. bytesInType :: (PSM m, Die m) => A.Type -> m BytesInResult