We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5539ec commit d41589fCopy full SHA for d41589f
src/extraction/FStarC.Extraction.ML.Term.fst
@@ -1661,6 +1661,14 @@ and term_as_mlexpr' (g:uenv) (top:term) : (mlexpr & e_tag & mlty) =
1661
(Format.fmt1 "Cannot extract %s (reify effect is not set)" (show top))
1662
)
1663
1664
+ (* Push applications into let bodies *)
1665
+ | Tm_let {lbs; body} ->
1666
+ term_as_mlexpr g { head with n = Tm_let { lbs; body = { t with n = Tm_app { hd=body; args } } } }
1667
+
1668
+ (* Combine nested applications *)
1669
+ | Tm_app {hd=hd; args=args0} ->
1670
+ term_as_mlexpr g { t with n = Tm_app { hd=hd; args=args0@args } }
1671
1672
| _ ->
1673
1674
let rec extract_app is_data (mlhead, mlargs_f) (f(*:e_tag*), t (* the type of (mlhead mlargs) *)) restArgs =
0 commit comments