From 6fb8780caefccdac8f29b9644feb03640a527134 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sun, 6 Apr 2008 15:38:59 +0000 Subject: [PATCH] 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.) --- backends/BackendPasses.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/BackendPasses.hs b/backends/BackendPasses.hs index 07da117..5649249 100644 --- a/backends/BackendPasses.hs +++ b/backends/BackendPasses.hs @@ -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