From 9632f9daf78d00dd6ae6bacafbdf0947a67e442f Mon Sep 17 00:00:00 2001 From: Hira Syeda Date: Thu, 12 Sep 2019 09:17:19 +0200 Subject: [PATCH 1/2] Fix too many open files error --- developers/readme_gen.sml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/developers/readme_gen.sml b/developers/readme_gen.sml index fcf46038ca..1ae6b343b2 100644 --- a/developers/readme_gen.sml +++ b/developers/readme_gen.sml @@ -221,6 +221,7 @@ fun read_block_comment start_comment end_comment filename = let val all_lines = map (drop_chars (String.size blank_prefix)) (fst_line :: read_rest ()) val _ = check_length_and_width all_lines + val _ = TextIO.closeIn(f) in all_lines end handle e => (TextIO.closeIn(f); raise e) end end; @@ -256,6 +257,7 @@ fun read_comment_from_script filename = let val all_lines = map (drop_chars (String.size prefix)) (fst_line :: read_rest ()) val _ = check_length_and_width all_lines + val _ = TextIO.closeIn(f) in all_lines end handle e => (TextIO.closeIn(f); raise e) end; @@ -276,6 +278,7 @@ fun read_comment_from_raw filename = let val _ = not (String.isPrefix " " (hd all_lines)) orelse fail "first line must not start with a blank" val _ = check_length_and_width all_lines + val _ = TextIO.closeIn(f) in all_lines end handle e => (TextIO.closeIn(f); raise e) end; From 784110582d4d3183b2be785da53e58059aeee44d Mon Sep 17 00:00:00 2001 From: Magnus Myreen Date: Thu, 12 Sep 2019 22:22:19 +0200 Subject: [PATCH 2/2] Remove an overload to get parser tests to work --- compiler/parsing/tests/cmlTestsScript.sml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/parsing/tests/cmlTestsScript.sml b/compiler/parsing/tests/cmlTestsScript.sml index dbbefb741b..b423300c3a 100644 --- a/compiler/parsing/tests/cmlTestsScript.sml +++ b/compiler/parsing/tests/cmlTestsScript.sml @@ -19,11 +19,10 @@ Overload EREL = [NN nElogicOR [NN nElogicAND [NN nEtyped [NN nEbefore [NN nEcomp l]]]]]]`` -Overaload EB = - ``λl. EREL [NN nErel [NN nElistop [NN nEadd [NN nEmult [NN nEapp [NN nEbase l]]]]]]`` +Overload EB = ``λl. EREL [NN nErel [NN nElistop [NN nEadd [NN nEmult [NN nEapp [NN nEbase l]]]]]]`` Overload OLDAPP = ``λt1 t2. App Opapp [t1; t2]`` -Overload "" = ``λt1 t2. App Opapp [t1; t2]`` +(* Overload "" = ``λt1 t2. App Opapp [t1; t2]`` *) Overload vbinop = ``λopn a1 a2. App Opapp [App Opapp [Var opn; a1]; a2]`` Overload V = ``λvnm. Var (Short vnm)`` Overload Pc = ``λcnm. Pcon (SOME (Short cnm))``