diff --git a/src/CPS.ml b/src/CPS.ml index 77eaca0..0714e87 100644 --- a/src/CPS.ml +++ b/src/CPS.ml @@ -6,6 +6,8 @@ module T = Tail exception NotValue of S.term (** ^ Raised when trying to use a non-value term as such *) +exception NotLightCPSable of S.term + let freshId = (** Generates a fresh variable name string *) let cId = ref 0 in @@ -113,7 +115,8 @@ and light_term varName valExpr valHint next = self, [lamVar; lamCont], cps_term_inner lamBody lamCont None), next) - | S.App _ | S.Print _ | S.IfZero _ -> assert false + | S.App _ | S.Print _ | S.IfZero _ -> + raise (NotLightCPSable valExpr) )