From eff4c59794868b89d60fdc411f9b544a270b817e Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 2 Aug 2021 20:26:21 -0400 Subject: Fixed a bug in the new compiler which allowed the same module to be imported more than once. --- stdlib/source/program/scriptum.lux | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'stdlib/source/program/scriptum.lux') diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux index da76896eb..941c55087 100644 --- a/stdlib/source/program/scriptum.lux +++ b/stdlib/source/program/scriptum.lux @@ -41,7 +41,7 @@ (def: (parameter_type_name id) (-> Nat Text) - (case (text.nth id ..name_options) + (case (text.char id ..name_options) (#.Some char) (text.of_char char) @@ -51,7 +51,7 @@ (def: type_var_names (Sequence Text) - (|> 0 (sequence.iterate inc) (sequence\map parameter_type_name))) + (|> 0 (sequence.iterations inc) (sequence\map parameter_type_name))) (template [ ] [(def: ( id) @@ -70,7 +70,7 @@ (-> [Text (List Text)] Nat Nat Text) (if (type_arg? id) (let [arg_id (..arg_id level id)] - (case (list.nth arg_id type_function_arguments) + (case (list.item arg_id type_function_arguments) (#.Some found) found @@ -78,7 +78,7 @@ (|> type_var_names (sequence.only (function (_ var_name) (not (list.member? text.equivalence type_function_arguments var_name)))) - (sequence.nth arg_id)))) + (sequence.item arg_id)))) type_func_name)) (def: (level_to_args offset level) @@ -378,7 +378,7 @@ ")")))) _ - (meta.failure (exception.construct anonymous_type_definition type)))) + (meta.failure (exception.error anonymous_type_definition type)))) (def: (document_types module types) (-> Text (List Value) (Meta (Markdown Block))) @@ -496,7 +496,7 @@ [outcome (\ file.default write (\ utf8.codec encode (md.markdown documentation)) path)] (in (case outcome (#try.Failure error) - (debug.log! (exception.construct io_error error)) + (debug.log! (exception.error io_error error)) (#try.Success _) []))))) -- cgit v1.2.3