summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKathy Gray2016-03-03 14:43:09 +0000
committerKathy Gray2016-03-03 14:43:09 +0000
commit7894dbb25d43649c5a893d1de5fe8475cc726948 (patch)
tree8991f32bdb68e3df357c0c83c9744c592db1218c
parent9d6875ba4147e3f52b3251bab77e52df03257aa3 (diff)
Fix typo in manual which had true instead of false on assert documentation
Fix bug in local register access
-rw-r--r--language/l2.ott2
-rw-r--r--language/manual.pdfbin342588 -> 342680 bytes
-rw-r--r--src/type_check.ml4
3 files changed, 4 insertions, 2 deletions
diff --git a/language/l2.ott b/language/l2.ott
index f750832a..345c7707 100644
--- a/language/l2.ott
+++ b/language/l2.ott
@@ -665,7 +665,7 @@ exp :: 'E_' ::=
| exit exp :: :: exit
{{ com expression to halt all current execution, potentially calling a system, trap, or interrupt handler with exp }}
| assert ( exp , exp' ) :: :: assert
- {{ com expression to halt with error, when the first expression is true, reporting the optional string as an error }}
+ {{ com expression to halt with error, when the first expression is false, reporting the optional string as an error }}
| ( exp ) :: S :: paren {{ ichlo [[exp]] }}
| ( annot ) exp :: :: internal_cast {{ com This is an internal cast, generated during type checking that will resolve into a syntactic cast after }}
| annot :: :: internal_exp {{ com This is an internal use for passing nexp information to library functions, postponed for constraint solving }}
diff --git a/language/manual.pdf b/language/manual.pdf
index 6dfb546e..605bccbd 100644
--- a/language/manual.pdf
+++ b/language/manual.pdf
Binary files differ
diff --git a/src/type_check.ml b/src/type_check.ml
index e3cdb4ac..61b94ad3 100644
--- a/src/type_check.ml
+++ b/src/type_check.ml
@@ -536,7 +536,9 @@ let rec check_exp envs (imp_param:nexp option) (widen:bool) (expect_t:t) (E_aux(
| Tapp("register",[TA_typ(t')]),Tuvar _ ->
(*let ef' = add_effect (BE_aux(BE_rreg,l)) ef in
let tannot = Base(([],t),(if is_alias then tag else External (Some i)),cs,ef',ef',bounds) in*)
- let tannot = Base(([],t),(if is_alias then tag else Emp_global),cs,pure_e,pure_e,bounds) in
+ let tannot = Base(([],t),
+ (if is_alias then tag else (if tag = Emp_local then tag else Emp_global)),
+ cs,pure_e,pure_e,bounds) in
let _,cs',ef',e' = type_coerce (Expr l) d_env Require false false b_env t' (rebuild tannot) expect_actual in
(e',t,t_env,cs@cs',bounds,ef')
| Tapp("register",[TA_typ(t')]),_ ->