Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 15 additions and 0 deletions.
  1. +5 −0 .gitignore
  2. +10 −0 Pugs/src/Pugs/Prim.hs
View
5 .gitignore
@@ -0,0 +1,5 @@
+/t/spec
+/Pugs/Pugs.buildinfo
+/Pugs/dist/
+/Pugs/perlxsi.c
+/Pugs/pugs
View
10 Pugs/src/Pugs/Prim.hs
@@ -108,6 +108,7 @@ op0 "defer" = const $ do
op0 "Int" = const $ return (VType $ mkType "Int")
op0 "Num" = const $ return (VType $ mkType "Num")
op0 "Rat" = const $ return (VType $ mkType "Rat")
+op0 "Bool" = const $ return (VType $ mkType "Bool")
op0 other = const $ fail ("Unimplemented listOp: " ++ other)
-- |Implementation of unary primitive operators and functions
@@ -215,6 +216,7 @@ op1 "list" = op1Cast VList
op1 "pair" = op1Cast $ VList . (map $ \(k, v) -> castV ((VStr k, v) :: VPair))
op1 "~" = op1Cast VStr
op1 "?" = op1Cast VBool
+op1 "Bool" = op1Cast VBool
op1 "int" = op1Cast VInt
op1 "Int" = op1Cast VInt
op1 "Num" = op1Cast VNum
@@ -1899,14 +1901,22 @@ initSyms = seq (length syms) $ do
\\n Int pre Int safe (Int)\
\\n Int pre Int safe (Num)\
\\n Int pre Int safe (Rat)\
+\\n Int pre Int safe (Bool)\
\\n Num pre Num safe ()\
\\n Num pre Num safe (Int)\
\\n Num pre Num safe (Num)\
\\n Num pre Num safe (Rat)\
+\\n Num pre Num safe (Bool)\
\\n Rat pre Rat safe ()\
\\n Rat pre Rat safe (Int)\
\\n Rat pre Rat safe (Num)\
\\n Rat pre Rat safe (Rat)\
+\\n Rat pre Rat safe (Bool)\
+\\n Bool pre Bool safe ()\
+\\n Bool pre Bool safe (Int)\
+\\n Bool pre Bool safe (Num)\
+\\n Bool pre Bool safe (Rat)\
+\\n Bool pre Bool safe (Bool)\
\\n List pre list safe (List)\
\\n Hash pre hash safe (List)\
\\n List pre pair safe (List)\

No commit comments for this range

Something went wrong with that request. Please try again.