Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 02b9558

Browse files
committed
Correct prog5 to construct and return a new frame.
1 parent 90c6bea commit 02b9558

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

semantic-core/src/Analysis/Eval.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ prog4 = fromBody $ block
114114
prog5 :: File (Term Core User)
115115
prog5 = fromBody $ block
116116
[ let' "mkPoint" .= lam' "_x" (lam' "_y" (block
117-
[ let' "x" .= pure "_x"
118-
, let' "y" .= pure "_y"
117+
[ let' "this" .= Core.frame
118+
, pure "this" Core.... let' "x" .= pure "_x"
119+
, pure "this" Core.... let' "y" .= pure "_y"
120+
, pure "this"
119121
]))
120122
, let' "point" .= pure "mkPoint" $$ Core.bool True $$ Core.bool False
121123
, pure "point" Core.... pure "x"

0 commit comments

Comments
 (0)