rc #13
@@ -23,6 +23,7 @@ qsort l = case l of
|
|||||||
greater = filter (<# a) as
|
greater = filter (<# a) as
|
||||||
in append (append (qsort lesser) (Cons a Nil)) (qsort greater)
|
in append (append (qsort lesser) (Cons a Nil)) (qsort greater)
|
||||||
|
|
||||||
|
list :: List Int#
|
||||||
list = Cons 9 (Cons 2 (Cons 3 (Cons 2
|
list = Cons 9 (Cons 2 (Cons 3 (Cons 2
|
||||||
(Cons 5 (Cons 2 (Cons 12 (Cons 89 Nil)))))))
|
(Cons 5 (Cons 2 (Cons 12 (Cons 89 Nil)))))))
|
||||||
|
|
||||||
|
|||||||
@@ -744,9 +744,8 @@ buildInitialHeap (view programScDefs -> ss) = mapAccumL allocateSc mempty compil
|
|||||||
compileE _ (Lit l) = compileEL l
|
compileE _ (Lit l) = compileEL l
|
||||||
compileE g (Let NonRec bs e) =
|
compileE g (Let NonRec bs e) =
|
||||||
-- we use compileE instead of compileC
|
-- we use compileE instead of compileC
|
||||||
mconcat binders <> compileE (trc g') e <> [Slide d]
|
mconcat binders <> compileE g' e <> [Slide d]
|
||||||
where
|
where
|
||||||
trc = traceWith (\s -> "compileE.g': "<>show s)
|
|
||||||
d = length bs
|
d = length bs
|
||||||
(g',binders) = mapAccumL compileBinder g bs
|
(g',binders) = mapAccumL compileBinder g bs
|
||||||
|
|
||||||
@@ -796,8 +795,7 @@ buildInitialHeap (view programScDefs -> ss) = mapAccumL allocateSc mempty compil
|
|||||||
where
|
where
|
||||||
n = length as
|
n = length as
|
||||||
binds = (NameKey <$> as) `zip` [0..]
|
binds = (NameKey <$> as) `zip` [0..]
|
||||||
g' = traceWith (\s -> "compileA.g': "<>show s) $
|
g' = binds ++ argOffset n g
|
||||||
binds ++ argOffset n g
|
|
||||||
c = compileE g' e
|
c = compileE g' e
|
||||||
compileA _ (Alter _ as e) = error "GM.compileA found an untagged\
|
compileA _ (Alter _ as e) = error "GM.compileA found an untagged\
|
||||||
\ constructor, which should have\
|
\ constructor, which should have\
|
||||||
|
|||||||
Reference in New Issue
Block a user