summaryrefslogtreecommitdiff
path: root/src/reduce.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/reduce.sml')
-rw-r--r--src/reduce.sml9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/reduce.sml b/src/reduce.sml
index 963863e8..36c9f44e 100644
--- a/src/reduce.sml
+++ b/src/reduce.sml
@@ -652,7 +652,14 @@ fun kindConAndExp (namedC, namedE) =
| EClosure (n, es) => (EClosure (n, map (exp env) es), loc)
| ELet (x, t, e1, e2) =>
- (ELet (x, con env t, exp env e1, exp (UnknownE :: env) e2), loc)
+ let
+ val t = con env t
+ in
+ if ESpecialize.functionInside t then
+ exp (KnownE e1 :: env) e2
+ else
+ (ELet (x, con env t, exp env e1, exp (UnknownE :: env) e2), loc)
+ end
| EServerCall (n, es, t) => (EServerCall (n, map (exp env) es, con env t), loc)
in