Declare size arrays before the corresponding real arrays.
This is because we sometimes need the size array while initialising the real array -- for example, if we're initialising a 2D array of channels.
This commit is contained in:
parent
d7333e4479
commit
006559271d
|
@ -212,7 +212,7 @@ declareSizesArray = doGeneric `ext1M` doStructured
|
||||||
defineSizesName m' n_sizes sizeSpecType
|
defineSizesName m' n_sizes sizeSpecType
|
||||||
return sizeSpec
|
return sizeSpec
|
||||||
s' <- doStructured s
|
s' <- doStructured s
|
||||||
return (A.Spec m sp $ A.Spec m sizeSpec $ s')
|
return (A.Spec m sizeSpec $ A.Spec m sp $ s')
|
||||||
(A.RecordType m _ fs, _) ->
|
(A.RecordType m _ fs, _) ->
|
||||||
do s' <- doStructured s
|
do s' <- doStructured s
|
||||||
fieldDeclarations <- foldM (declareFieldSizes (A.nameName n) m) s' fs
|
fieldDeclarations <- foldM (declareFieldSizes (A.nameName n) m) s' fs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user