module AnalFBWW ( analFBWW ) where
-import Ubiq{-uitous-}
+IMP_Ubiq(){-uitous-}
-import CoreSyn ( CoreBinding(..) )
+import CoreSyn ( SYN_IE(CoreBinding) )
import Util ( panic{-ToDo:rm-} )
--import Util
addArgs :: Int -> OurFBType -> OurFBType
addArgs n (IsFB (FBType args prod))
- = IsFB (FBType (take n (repeat FBBadConsum) ++ args) prod)
+ = IsFB (FBType (nOfThem n FBBadConsum ++ args) prod)
addArgs n IsNotFB = IsNotFB
addArgs n IsCons = panic "adding argument to a cons"
addArgs n IsBottom = IsNotFB
joinFBType (IsBottom) a = a
joinFBType a (IsBottom) = a
joinFBType (IsFB (FBType args prod)) (IsFB (FBType args' prod'))
- | length args == length args' = (IsFB (FBType (zipWith argJ args args')
+ | length args == length args' = (IsFB (FBType (zipWith{-Equal-} argJ args args')
(prodJ prod prod')))
where
argJ FBGoodConsum FBGoodConsum = FBGoodConsum
analExprFBWW (App f atom) env = rmArg (analExprFBWW f env)
analExprFBWW (CoTyApp f ty) env = analExprFBWW f env
analExprFBWW (SCC lab e) env = analExprFBWW e env
+analExprFBWW (Coerce _ _ _) env = panic "AnalFBWW:analExprFBWW:Coerce"
analExprFBWW (Let binds e) env = analExprFBWW e (analBind binds env)
analExprFBWW (Case e alts) env = foldl1 joinFBType (analAltsFBWW alts env)
annotateExprFBWW (App f atom) env = App (annotateExprFBWW f env) atom
annotateExprFBWW (CoTyApp f ty) env = CoTyApp (annotateExprFBWW f env) ty
annotateExprFBWW (SCC lab e) env = SCC lab (annotateExprFBWW e env)
+annotateExprFBWW (Coerce c ty e) env = Coerce c ty (annotateExprFBWW e env)
annotateExprFBWW (Case e alts) env = Case (annotateExprFBWW e env)
(annotateAltsFBWW alts env)
annotateExprFBWW (Let bnds e) env = Let bnds' (annotateExprFBWW e env')