Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a barebones "gist", like "~"

  • Loading branch information...
commit 7c0bd17a8f8b91d7d6e6c5c800792f42a018cee2 1 parent 2512b2d
@coke coke authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 Pugs/src/Pugs/Prim.hs
View
4 Pugs/src/Pugs/Prim.hs
@@ -215,8 +215,9 @@ op1 "List::reverse" = \v -> do
op1 "list" = op1Cast VList
op1 "pair" = op1Cast $ VList . (map $ \(k, v) -> castV ((VStr k, v) :: VPair))
op1 "~" = op1Cast VStr
+op1 "gist" = op1Cast VStr -- Cheat
op1 "?" = op1Cast VBool
-op1 "so" = op1Cast VBool
+op1 "so" = op1Cast VBool
op1 "Bool" = op1Cast VBool
op1 "int" = op1Cast VInt
op1 "Int" = op1Cast VInt
@@ -1889,6 +1890,7 @@ initSyms = seq (length syms) $ do
\\n Num pre sqrt safe (Num)\
\\n Num spre - safe (Num)\
\\n Str spre ~ safe (Str)\
+\\n Str pre gist safe (Any)\
\\n Bool spre ? safe (Bool)\
\\n Bool pre so safe (Any)\
\\n Str spre = unsafe (?IO)\
Please sign in to comment.
Something went wrong with that request. Please try again.