Skip to content
This repository was archived by the owner on Feb 3, 2021. It is now read-only.

Commit 7c0bd17

Browse files
committed
Add a barebones "gist", like "~"
1 parent 2512b2d commit 7c0bd17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Pugs/src/Pugs/Prim.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ op1 "List::reverse" = \v -> do
215215
op1 "list" = op1Cast VList
216216
op1 "pair" = op1Cast $ VList . (map $ \(k, v) -> castV ((VStr k, v) :: VPair))
217217
op1 "~" = op1Cast VStr
218+
op1 "gist" = op1Cast VStr -- Cheat
218219
op1 "?" = op1Cast VBool
219-
op1 "so" = op1Cast VBool
220+
op1 "so" = op1Cast VBool
220221
op1 "Bool" = op1Cast VBool
221222
op1 "int" = op1Cast VInt
222223
op1 "Int" = op1Cast VInt
@@ -1889,6 +1890,7 @@ initSyms = seq (length syms) $ do
18891890
\\n Num pre sqrt safe (Num)\
18901891
\\n Num spre - safe (Num)\
18911892
\\n Str spre ~ safe (Str)\
1893+
\\n Str pre gist safe (Any)\
18921894
\\n Bool spre ? safe (Bool)\
18931895
\\n Bool pre so safe (Any)\
18941896
\\n Str spre = unsafe (?IO)\

0 commit comments

Comments
 (0)