Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

else, two tests for it, and todos

  • Loading branch information...
commit 1f2421d52a6fc59fb5bd6c64e356e932a1a1b3f3 1 parent 431f584
Joe Politz jpolitz authored
6 src/TODO
View
@@ -1,8 +1,10 @@
Release
[] Documentation
- [] Extract docs from code
+ [x] Extract docs from code
[] Type-checking up to List(a) and arrows/records
- [] "Also, we've been talking about and working on the untyped to typed contract installation - do we want to have some version of that working?"
+ [] "Also, we've been talking about and working on the untyped to typed
+ contract installation - do we want to have some version of that
+ working?"
- contracts up to monomorphic structures and polymorphic functions
[] better error reporting / pretty printing / support for debugging. For example, printing out names for brands (where appropriate) would be a start.
[] Enough API/Library support to do basic file tasks and CS019 assignments (we're generating/partially through this list)
4 src/lang/runtime.rkt
View
@@ -38,7 +38,8 @@
[brander-pfun brander]
[check-brand-pfun check-brand]
[keys-pfun keys]
- [raise-pfun raise])
+ [raise-pfun raise]
+ [p-else else])
Any?
Number?
String?
@@ -419,6 +420,7 @@
("not" . ,(mk-single-bool-fun
(cast not (Boolean -> Boolean))))))))
+(define p-else (mk-bool #t))
(define: (to-string (v : Value)) : String
(match v
2  src/tests/compile-tests.rkt
View
@@ -146,6 +146,8 @@
(check-pyret-exn "def o: seal({x:1}.{x:2}, []) o.x" "get-field:")
(check-pyret "cond: | true => 2 | false => 1 end" two)
+(check-pyret "cond: | false => 1 | else => 2 end" two)
+(check-pyret "cond: | else => 2 end" two)
(check-pyret "cond: | false => 2 | true => 10 end" ten)
(check-pyret "cond: | true => 2 | true => 1 end" two)
(check-pyret "cond: | 3.lessthan(2) => 10 | true => 2 end" two)
Please sign in to comment.
Something went wrong with that request. Please try again.