Skip to content

Commit

Permalink
Merge pull request #690 from CakeML/close-files
Browse files Browse the repository at this point in the history
Fix too many open files error
  • Loading branch information
myreen committed Sep 13, 2019
2 parents f83143b + 7841105 commit 30193e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/parsing/tests/cmlTestsScript.sml
Original file line number Diff line number Diff line change
Expand Up @@ -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))``
Expand Down
3 changes: 3 additions & 0 deletions developers/readme_gen.sml
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 30193e4

Please sign in to comment.