summaryrefslogtreecommitdiff
path: root/src/cjrize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-10-06 15:39:27 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-10-06 15:39:27 -0400
commit5765efc372a628ede62d8b27c799708f530a3456 (patch)
treefa80b1891097e60c758ecb12fd8c441f37a03c85 /src/cjrize.sml
parent37f1efc23e011927873cfc5871ac7686eac5a745 (diff)
SELECT DISTINCT; eta expansion during Cjrization
Diffstat (limited to 'src/cjrize.sml')
-rw-r--r--src/cjrize.sml11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cjrize.sml b/src/cjrize.sml
index 6a79b4e6..bf814266 100644
--- a/src/cjrize.sml
+++ b/src/cjrize.sml
@@ -520,9 +520,14 @@ fun cifyDecl ((d, loc), sm) =
in
((ax, dom) :: args, t, e)
end
- | (L'.TFun _, _) =>
- (ErrorMsg.errorAt loc "Function isn't explicit at code generation";
- ([], tAll, eAll))
+ | (L'.TFun (dom, ran), _) =>
+ let
+ val e = MonoEnv.liftExpInExp 0 eAll
+ val e = (L.EApp (e, (L.ERel 0, loc)), loc)
+ val (args, t, e) = unravel (ran, e)
+ in
+ (("x", dom) :: args, t, e)
+ end
| _ => ([], tAll, eAll)
val (args, ran, e) = unravel (t, e)