This commit is contained in:
crumbtoo
2024-02-22 14:05:29 -07:00
parent 45a6609152
commit 4a120f9899
5 changed files with 48 additions and 13 deletions

View File

@@ -116,7 +116,7 @@ floatNonStrictCases g = goE
goE e
traverse_ goE altBodies
pure e'
goC (f :$ x) = (:$) <$> goC f <*> goC x
goC (App f x) = App <$> goC f <*> goC x
goC (Let r bs e) = Let r <$> bs' <*> goE e
where bs' = travBs goC bs
goC (Lit l) = pure (Lit l)
@@ -132,6 +132,7 @@ floatNonStrictCases g = goE
& traverse goC
& const (pure bs)
-- ^ ??? what the fuck?
-- ^ 24/02/22: what is this shit lol?
-- when provided with a case expr, floatCase will float the case into a
-- supercombinator of its free variables. the sc is returned along with an