Make a pattern match more explicit.

This is looking at array dimensions in literals. By this point unknown
dimensions should have been inferred; if they haven't, I'd rather it blew up
here than caused bizarre behaviour later on.

(This is a good candidate for a property check.)
This commit is contained in:
Adam Sampson 2008-04-06 15:38:59 +00:00
parent 28f329dd07
commit 6fb8780cae

View File

@ -219,7 +219,7 @@ declareSizesArray = doGeneric `ext1M` doStructured
makeStaticSizeSpec :: Meta -> A.Name -> [A.Dimension] -> A.SpecType
makeStaticSizeSpec m n ds = makeDynamicSizeSpec m n es
where
es = [e | A.Dimension e <- ds]
es = [case d of A.Dimension e -> e | d <- ds]
makeDynamicSizeSpec :: Meta -> A.Name -> [A.Expression] -> A.SpecType
makeDynamicSizeSpec m n es = sizeSpecType