Skip to content

Commit

Permalink
Fix more typos, revert string reversal
Browse files Browse the repository at this point in the history
The performance bottleneck is not in the parser.
  • Loading branch information
IlmariReissumies committed Jan 31, 2022
1 parent bf23b9f commit 65fba01
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ val () = ENABLE_PMATCH_CASES();
Definition parse_strlit_innards_def:
parse_strlit_innards cs acc =
(case cs of
(#"\"" ::cs) => SOME (acc,cs)
(#"\"" ::cs) => SOME (REVERSE acc,cs)
| (x::cs) =>
parse_strlit_innards cs (x::acc)
| [] => NONE)
Expand Down Expand Up @@ -207,15 +207,15 @@ val _ = (append_prog o process_topdecs) ‘
| (Kernel.Tyapp s [t]) => present_type t ^ " " ^ s
| (Kernel.Tyapp s l) =>
let
val ps = String.concat(intersperse_commas(map present_type l))
val ps = String.concat(intersperse_commas(List.map present_type l))
in
"(" ^ ps ^ ") " ^ s
end

val _ = (append_prog o process_topdecs) ‘
fun present_tot ty =
case ty of (Inl ty) => present_type ty
| (Inr(Kernel.Const name tys)) => name ^ " : " ^ present_type ty’
| (Inr(Kernel.Const name ty)) => name ^ " : " ^ present_type ty’

val _ = (append_prog o process_topdecs)
fun main u =
Expand Down

0 comments on commit 65fba01

Please sign in to comment.