From 962502e64dc170088af133470eb878d7dd0e8d4c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 12 Apr 2017 21:07:23 -0400 Subject: - Simplified some of the documentation and error messages. --- stdlib/source/lux.lux | 28 +++++++++++++-------------- stdlib/source/lux/cli.lux | 4 ++-- stdlib/source/lux/concurrency/actor.lux | 4 ++-- stdlib/source/lux/concurrency/atom.lux | 2 +- stdlib/source/lux/concurrency/promise.lux | 2 +- stdlib/source/lux/control/monoid.lux | 2 +- stdlib/source/lux/control/pipe.lux | 4 ++-- stdlib/source/lux/data/coll/dict.lux | 2 +- stdlib/source/lux/data/coll/list.lux | 6 +++--- stdlib/source/lux/data/coll/stream.lux | 2 +- stdlib/source/lux/data/format/json.lux | 10 +++++----- stdlib/source/lux/data/number.lux | 4 ++-- stdlib/source/lux/data/text.lux | 4 ++-- stdlib/source/lux/data/text/format.lux | 2 +- stdlib/source/lux/data/text/lexer.lux | 16 +++++++-------- stdlib/source/lux/host.jvm.lux | 12 ++++++------ stdlib/source/lux/io.lux | 2 +- stdlib/source/lux/macro.lux | 2 +- stdlib/source/lux/macro/poly.lux | 4 ++-- stdlib/source/lux/macro/poly/eq.lux | 2 +- stdlib/source/lux/macro/poly/functor.lux | 2 +- stdlib/source/lux/macro/poly/text-encoder.lux | 2 +- stdlib/source/lux/macro/syntax.lux | 10 +++++----- stdlib/source/lux/test.lux | 2 +- stdlib/source/lux/type/auto.lux | 6 +++--- stdlib/source/lux/type/check.lux | 2 +- stdlib/test/test/lux/host.jvm.lux | 8 -------- 27 files changed, 69 insertions(+), 77 deletions(-) diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 1307231e2..08ef10e51 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -64,7 +64,7 @@ (+1)) (+1 [["lux" "type?"] (+0 true)] (+1 [["lux" "export?"] (+0 true)] - (+1 [["lux" "doc"] (+6 "An unusual type that possesses no value, and thus can't be instantiated.")] + (+1 [["lux" "doc"] (+6 "An unusual type that possesses no value, and thus cannot be instantiated.")] (+0))))) (_lux_def Unit @@ -198,7 +198,7 @@ (#ExQ (+0) (#BoundT +1))) (#Cons [["lux" "type?"] (+0 true)] (#Cons [["lux" "export?"] (+0 true)] - (#Cons [["lux" "doc"] (+6 "The type of things whose type doesn't matter. + (#Cons [["lux" "doc"] (+6 "The type of things whose type does not matter. It can be used to write functions or data-structures that can take, or return, anything.")] #Nil)))) @@ -1869,7 +1869,7 @@ (#Right [state module-name]) _ - (#Left "Can't get the module name without a module!") + (#Left "Cannot get the module name without a module!") ))) (macro:' #export (` tokens) @@ -2845,7 +2845,7 @@ (^ (list& [_ (#FormS patterns)] body branches)) (case patterns #Nil - (fail "^or can't have 0 patterns") + (fail "^or cannot have 0 patterns") _ (let' [pairs (|> patterns @@ -3982,7 +3982,7 @@ (return module) (case (nth num-ups (split-module-contexts current-module)) #None - (fail (Text/append "Can't clean module: " module)) + (fail (Text/append "Cannot clean module: " module)) (#Some top-module) (return (|> (list& top-module parts') (interpose "/") reverse (fold Text/append "")))) @@ -5326,7 +5326,7 @@ ["Text" Text text$]) _ - (fail (Text/append "Can't anti-quote type: " (Ident/encode name)))))) + (fail (Text/append "Cannot anti-quote type: " (Ident/encode name)))))) (def: (anti-quote token) (-> AST (Lux AST)) @@ -5404,7 +5404,7 @@ (-> (List AST) (Lux MultiLevelCase)) (case levels #;Nil - (fail "Multi-level patterns can't be empty.") + (fail "Multi-level patterns cannot be empty.") (#;Cons init extras) (do Monad @@ -5433,7 +5433,7 @@ (match-uri endpoint? parts' uri') _ - (#;Left (format "Static part " (%t static) " doesn't match URI: " uri))) + (#;Left (format "Static part " (%t static) " does not match URI: " uri))) "Short-cuts can be taken when using boolean tests." "The example above can be rewritten as..." @@ -5442,7 +5442,7 @@ (match-uri endpoint? parts' uri') _ - (#;Left (format "Static part " (%t static) " doesn't match URI: " uri))))} + (#;Left (format "Static part " (%t static) " does not match URI: " uri))))} (case tokens (^ (list& [_meta (#;FormS levels)] body next-branches)) (do Monad @@ -5532,7 +5532,7 @@ (wrap (list (` (#ExT (~ (nat$ var-id)))))) #;None - (fail (Text/append "Indexed-type doesn't exist: " (Nat/encode idx))))) + (fail (Text/append "Indexed-type does not exist: " (Nat/encode idx))))) _ (fail "Wrong syntax for $"))) @@ -5663,12 +5663,12 @@ (wrap arg-name) _ - (fail "Couldn't parse an argument."))) + (fail "Could not parse an argument."))) args')] (wrap [[name args] tokens'])) _ - (fail "Couldn't parse a complex declaration.") + (fail "Could not parse a complex declaration.") )) (def: (parse-any tokens) @@ -5678,7 +5678,7 @@ (:: Monad wrap [token tokens']) _ - (fail "Couldn't parse anything.") + (fail "Could not parse anything.") )) (def: (parse-end tokens) @@ -5703,7 +5703,7 @@ (macro: #export (template: tokens) {#;doc (doc "Define macros in the style of do-template and ^template." - "For simple macros that don't need any fancy features." + "For simple macros that do not need any fancy features." (template: (square x) (i.* x x)))} (do Monad diff --git a/stdlib/source/lux/cli.lux b/stdlib/source/lux/cli.lux index c148161ee..afe784e98 100644 --- a/stdlib/source/lux/cli.lux +++ b/stdlib/source/lux/cli.lux @@ -67,7 +67,7 @@ (#;Right [inputs' arg]) _ - (#;Left "Can't parse empty arguments.")))) + (#;Left "Cannot parse empty arguments.")))) (def: #export (parse parser) {#;doc "Parses the next input with a parsing function."} @@ -83,7 +83,7 @@ (#;Left parser-error)) _ - (#;Left "Can't parse empty arguments.")))) + (#;Left "Cannot parse empty arguments.")))) (def: #export (option names) {#;doc "Checks that a given option (with multiple possible names) has a value."} diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux index f60bb61b4..14e382e1c 100644 --- a/stdlib/source/lux/concurrency/actor.lux +++ b/stdlib/source/lux/concurrency/actor.lux @@ -107,7 +107,7 @@ (def: #export (keep-alive init behavior) {#;doc "Given initial-state and a behavior, spawns an actor that will reboot if it dies of errors. - However, if it is killed, it won't re-spawn."} + However, if it is killed, it will not re-spawn."} (All [s m] (-> s (Behavior s m) (IO (Actor s m)))) (io (let [ka-actor (: (Actor (Actor ($ +0) ($ +1)) ($ +1)) (io;run (spawn (io;run (spawn init behavior)) @@ -210,7 +210,7 @@ (if (i.>= 0 to-add) (let [new-state (i.+ to-add *state*)] (wrap (#;Right [new-state [*state* new-state]]))) - (wrap (#;Left "Can't add negative numbers!")))) + (wrap (#;Left "Cannot add negative numbers!")))) ))} (with-gensyms [g!message g!error g!return g!error g!output] (let [g!state-name (ast;symbol ["" (format _name "//STATE")]) diff --git a/stdlib/source/lux/concurrency/atom.lux b/stdlib/source/lux/concurrency/atom.lux index fdb9754f7..209dec8db 100644 --- a/stdlib/source/lux/concurrency/atom.lux +++ b/stdlib/source/lux/concurrency/atom.lux @@ -17,7 +17,7 @@ (def: #export (compare-and-swap current new atom) {#;doc "Only mutates an atom if you can present it's current value. - That guarantees that atom wasn't updated since you last read from it."} + That guarantees that atom was not updated since you last read from it."} (All [a] (-> a a (Atom a) (IO Bool))) (io (_lux_proc ["atom" "compare-and-swap"] [atom current new]))) diff --git a/stdlib/source/lux/concurrency/promise.lux b/stdlib/source/lux/concurrency/promise.lux index f6c19eeab..ef3d28a29 100644 --- a/stdlib/source/lux/concurrency/promise.lux +++ b/stdlib/source/lux/concurrency/promise.lux @@ -63,7 +63,7 @@ true)) (def: #export (resolve value promise) - {#;doc "Sets an Promise's value if it hasn't been done yet."} + {#;doc "Sets an Promise's value if it has not been done yet."} (All [a] (-> a (Promise a) (IO Bool))) (do Monad [old (atom;get promise)] diff --git a/stdlib/source/lux/control/monoid.lux b/stdlib/source/lux/control/monoid.lux index e2be4603e..356bc3c13 100644 --- a/stdlib/source/lux/control/monoid.lux +++ b/stdlib/source/lux/control/monoid.lux @@ -4,7 +4,7 @@ (sig: #export (Monoid a) {#;doc "A way to combine (append) values. - Includes an identity (unit) value which doesn't alter any other value when combined with."} + Includes an identity (unit) value which does not alter any other value when combined with."} (: a unit) (: (-> a a a) diff --git a/stdlib/source/lux/control/pipe.lux b/stdlib/source/lux/control/pipe.lux index 26a94a554..7c68c06f6 100644 --- a/stdlib/source/lux/control/pipe.lux +++ b/stdlib/source/lux/control/pipe.lux @@ -47,7 +47,7 @@ prev) {#;doc (doc "Branching for pipes." "Both the tests and the bodies are piped-code, and must be given inside a tuple." - "If a last else-pipe isn't given, the piped-argument will be used instead." + "If a last else-pipe is not given, the piped-argument will be used instead." (|> 5 (?> [i.even?] [(i.* 2)] [i.odd?] [(i.* 3)] @@ -101,7 +101,7 @@ (syntax: #export (~> [body body^] prev) {#;doc (doc "Non-updating pipes." - "Will generate piped computations, but their results won't be used in the larger scope." + "Will generate piped computations, but their results will not be used in the larger scope." (|> 5 (~> [int-to-nat %n log!]) (i.* 10)))} diff --git a/stdlib/source/lux/data/coll/dict.lux b/stdlib/source/lux/data/coll/dict.lux index ecd470ef9..6a11dcc77 100644 --- a/stdlib/source/lux/data/coll/dict.lux +++ b/stdlib/source/lux/data/coll/dict.lux @@ -438,7 +438,7 @@ ## remove the node. (#Base (unset-bit-position bit bitmap) (remove! idx base))) - ## But, if it didn't come out empty, then the + ## But, if it did not come out empty, then the ## position is kept, and the node gets updated. (#Base bitmap (update! idx (#;Left sub-node') base))))) diff --git a/stdlib/source/lux/data/coll/list.lux b/stdlib/source/lux/data/coll/list.lux index 86afacfc6..2aeb621d3 100644 --- a/stdlib/source/lux/data/coll/list.lux +++ b/stdlib/source/lux/data/coll/list.lux @@ -47,7 +47,7 @@ (filter p xs')))) (def: #export (partition p xs) - {#;doc "Divide the list into all elements that satisfy a predicate, and all elements that don't."} + {#;doc "Divide the list into all elements that satisfy a predicate, and all elements that do not."} (All [a] (-> (-> a Bool) (List a) [(List a) (List a)])) [(filter p xs) (filter (complement p) xs)]) @@ -371,7 +371,7 @@ (~ g!blank) #;Nil))))] (#;Right [state (list code)])) - (#;Left "Can't zip 0 lists.")) + (#;Left "Cannot zip 0 lists.")) _ (#;Left "Wrong syntax for zip"))) @@ -417,7 +417,7 @@ (~ g!blank) #;Nil))))] (#;Right [state (list code)])) - (#;Left "Can't zip-with 0 lists.")) + (#;Left "Cannot zip-with 0 lists.")) _ (#;Left "Wrong syntax for zip-with"))) diff --git a/stdlib/source/lux/data/coll/stream.lux b/stdlib/source/lux/data/coll/stream.lux index ccfa391b5..8babfee91 100644 --- a/stdlib/source/lux/data/coll/stream.lux +++ b/stdlib/source/lux/data/coll/stream.lux @@ -38,7 +38,7 @@ (def: #export (cycle xs) {#;doc "Go over the elements of a list forever. - The list shouldn't be empty."} + The list should not be empty."} (All [a] (-> (List a) (Maybe (Stream a)))) (case xs diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux index f6bbe08b3..41e5bfe5c 100644 --- a/stdlib/source/lux/data/format/json.lux +++ b/stdlib/source/lux/data/format/json.lux @@ -156,7 +156,7 @@ (#;Right (dict;keys obj)) _ - (#;Left (format "Can't get the fields of a non-object.")))) + (#;Left (format "Cannot get the fields of a non-object.")))) (def: #export (get key json) {#;doc "A JSON object field getter."} @@ -171,7 +171,7 @@ (#;Left (format "Missing field " (show-string key) " on object."))) _ - (#;Left (format "Can't get field " (show-string key) " of a non-object.")))) + (#;Left (format "Cannot get field " (show-string key) " of a non-object.")))) (def: #export (set key value json) {#;doc "A JSON object field setter."} @@ -181,7 +181,7 @@ (#;Right (#Object (dict;put key value obj))) _ - (#;Left (format "Can't set field " (show-string key) " of a non-object.")))) + (#;Left (format "Cannot set field " (show-string key) " of a non-object.")))) (do-template [ ] [(def: #export ( key json) @@ -918,7 +918,7 @@ (wrap (` (: (~ (->Codec//encode (type;to-ast :x:))) ((~ .func.) (~@ .args.)))))) (poly;bound *env* :x:) - (macro;fail (format "Can't create JSON encoder for: " (%type :x:))) + (macro;fail (format "Cannot create JSON encoder for: " (%type :x:))) )))) (poly: #hidden (Codec//decode *env* :x:) @@ -1086,7 +1086,7 @@ (do @ [g!bound (poly;bound *env* :x:)] (wrap g!bound)) - (macro;fail (format "Can't create JSON decoder for: " (%type :x:))) + (macro;fail (format "Cannot create JSON decoder for: " (%type :x:))) )))) (syntax: #export (Codec :x:) diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux index 204b5e3a2..cdc4d6035 100644 --- a/stdlib/source/lux/data/number.lux +++ b/stdlib/source/lux/data/number.lux @@ -160,8 +160,8 @@ #;None (#;Left ))))] - [Real ["real" "encode"] ["real" "decode"] "Couldn't decode Real"] - [ Deg [ "deg" "encode"] [ "deg" "decode"] "Couldn't decode Deg"] + [Real ["real" "encode"] ["real" "decode"] "Could not decode Real"] + [ Deg [ "deg" "encode"] [ "deg" "decode"] "Could not decode Deg"] ) (struct: #export _ (Hash Nat) diff --git a/stdlib/source/lux/data/text.lux b/stdlib/source/lux/data/text.lux index b3192a56d..ad33c67ac 100644 --- a/stdlib/source/lux/data/text.lux +++ b/stdlib/source/lux/data/text.lux @@ -165,8 +165,8 @@ #;Some) #;None - (#;Left "Couldn't decode text")) - (#;Left "Couldn't decode text")))) + (#;Left "Could not decode text")) + (#;Left "Could not decode text")))) (struct: #export _ (Hash Text) (def: eq Eq) diff --git a/stdlib/source/lux/data/text/format.lux b/stdlib/source/lux/data/text/format.lux index 1793ed977..9a1c56188 100644 --- a/stdlib/source/lux/data/text/format.lux +++ b/stdlib/source/lux/data/text/format.lux @@ -19,7 +19,7 @@ (syntax: #export (format [fragments (s;many s;any)]) {#;doc (doc "Text interpolation as a macro." - (format "Static part " (%t static) " doesn't match URI: " uri))} + (format "Static part " (%t static) " does not match URI: " uri))} (wrap (list (` ($_ _append_ (~@ fragments)))))) ## [Formatters] diff --git a/stdlib/source/lux/data/text/lexer.lux b/stdlib/source/lux/data/text/lexer.lux index 49a711236..e43d87bd9 100644 --- a/stdlib/source/lux/data/text/lexer.lux +++ b/stdlib/source/lux/data/text/lexer.lux @@ -21,7 +21,7 @@ (def: (map f fa) (function [input] (case (fa input) - (#E;Error msg) (#E;Error msg) + (#E;Error msg) (#E;Error msg) (#E;Success [input' output]) (#E;Success [input' (f output)]))))) (struct: #export _ (Applicative Lexer) @@ -86,7 +86,7 @@ (#E;Success [input' output]) _ - (#E;Error "Can't parse character from empty text.")) + (#E;Error "Cannot parse character from empty text.")) )) (def: #export (seq left right) @@ -276,7 +276,7 @@ (#E;Success [input output]) _ - (#E;Error "Can't peek character from empty text.")) + (#E;Error "Cannot peek character from empty text.")) )) (def: #export (char test) @@ -290,7 +290,7 @@ (#E;Error ($_ Text/append "Expected " (:: char;Codec encode test) " @ " (:: text;Codec encode input)))) _ - (#E;Error "Can't parse character from empty text.")) + (#E;Error "Cannot parse character from empty text.")) )) (def: #export get-input @@ -356,10 +356,10 @@ (#E;Error ($_ Text/append "Character (" init ") is not one of: " options " @ " (:: text;Codec encode input)))) _ - (#E;Error "Can't parse character from empty text.")))) + (#E;Error "Cannot parse character from empty text.")))) (def: #export (none-of options) - {#;doc "Only lex characters that aren't part of a piece of text."} + {#;doc "Only lex characters that are not part of a piece of text."} (-> Text (Lexer Char)) (function [input] (case (text;split +1 input) @@ -374,7 +374,7 @@ (#E;Error ($_ Text/append "Character (" init ") is one of: " options " @ " (:: text;Codec encode input)))) _ - (#E;Error "Can't parse character from empty text.")))) + (#E;Error "Cannot parse character from empty text.")))) (def: #export (satisfies p) {#;doc "Only lex characters that satisfy a predicate."} @@ -391,7 +391,7 @@ (#E;Error ($_ Text/append "Character does not satisfy predicate: " (:: text;Codec encode input)))) _ - (#E;Error "Can't parse character from empty text.")))) + (#E;Error "Cannot parse character from empty text.")))) (def: #export space {#;doc "Only lex white-space."} diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux index 0c648c037..9bdaeac54 100644 --- a/stdlib/source/lux/host.jvm.lux +++ b/stdlib/source/lux/host.jvm.lux @@ -723,7 +723,7 @@ (s;form (do s;Monad [name (full-class-name^ imports) params (s;some (generic-type^ imports type-vars)) - _ (s;assert (format name " can't be a type-parameter!") + _ (s;assert (format name " cannot be a type-parameter!") (not (member? text;Eq (map product;left type-vars) name)))] (wrap (#GenericClass name params)))) )) @@ -1481,7 +1481,7 @@ [class (generic-type^ imports (list))] [obj (s;opt s;any)]) {#;doc (doc "Checks whether an object is an instance of a particular class." - "Caveat emptor: Can't check for polymorphism, so avoid using parameterized classes." + "Caveat emptor: Cannot check for polymorphism, so avoid using parameterized classes." (instance? String "YOLO"))} (case obj (#;Some obj) @@ -1623,7 +1623,7 @@ (` (let [(~ g!temp) (~ return-term)] (if (null? (:! (host (~' java.lang.Object)) (~ g!temp))) - (error! "Can't produce null references from method calls.") + (error! "Cannot produce null references from method calls.") (~ g!temp)))))]) _ @@ -1958,7 +1958,7 @@ (waitOn [lux.Function] void) (#static [A] make [A] (JvmPromise A))) "It should also be noted, the only types that may show up in method arguments or return values may be Java classes, arrays, primitives, void or type-parameters." - "Lux types, such as Maybe can't be named (otherwise, they'd be confused for Java classes)." + "Lux types, such as Maybe cannot be named (otherwise, they'd be confused for Java classes)." "Also, the names of the imported members will look like ClassName.MemberName." "E.g.:" @@ -2007,7 +2007,7 @@ (#;AppT F A) (case (type;apply-type F A) #;None - (macro;fail (format "Can't apply type: " (type;to-text F) " to " (type;to-text A))) + (macro;fail (format "Cannot apply type: " (type;to-text F) " to " (type;to-text A))) (#;Some type') (type->class-name type')) @@ -2019,7 +2019,7 @@ (:: Monad wrap "java.lang.Object") (^or #;VoidT (#;VarT _) (#;ExT _) (#;BoundT _) (#;SumT _) (#;ProdT _) (#;FunctionT _) (#;UnivQ _) (#;ExQ _)) - (macro;fail (format "Can't convert to JvmType: " (type;to-text type))) + (macro;fail (format "Cannot convert to JvmType: " (type;to-text type))) )) (syntax: #export (array-load idx array) diff --git a/stdlib/source/lux/io.lux b/stdlib/source/lux/io.lux index 4fcb2a506..d538fbfef 100644 --- a/stdlib/source/lux/io.lux +++ b/stdlib/source/lux/io.lux @@ -13,7 +13,7 @@ ## [Syntax] (macro: #export (io tokens state) {#;doc (doc "Delays the evaluation of an expression, by wrapping it in an IO 'thunk'." - "Great for wrapping effectful computations (which won't be performed until the IO is \"run\")." + "Great for wrapping effectful computations (which will not be performed until the IO is \"run\")." (io (exec (log! msg) "Some value...")))} diff --git a/stdlib/source/lux/macro.lux b/stdlib/source/lux/macro.lux index e012e2aa0..4569eeac6 100644 --- a/stdlib/source/lux/macro.lux +++ b/stdlib/source/lux/macro.lux @@ -557,7 +557,7 @@ (if (or exported? (Text/= this-module-name module)) (wrap [idx tag-list type]) - (fail ($_ Text/append "Can't access tag: " (Ident/encode tag) " from module " this-module-name))) + (fail ($_ Text/append "Cannot access tag: " (Ident/encode tag) " from module " this-module-name))) _ (fail ($_ Text/append "Unknown tag: " (Ident/encode tag)))))) diff --git a/stdlib/source/lux/macro/poly.lux b/stdlib/source/lux/macro/poly.lux index 8fed3fb4c..96158a80e 100644 --- a/stdlib/source/lux/macro/poly.lux +++ b/stdlib/source/lux/macro/poly.lux @@ -134,7 +134,7 @@ (wrap [tags :def:])) _ - (macro;fail (format "Unnamed types can't have tags: " (%type :type:)))))) + (macro;fail (format "Unnamed types cannot have tags: " (%type :type:)))))) (def: #export polymorphic (Matcher [(List AST) Type]) @@ -349,7 +349,7 @@ (wrap derived-name) _ - (macro;fail "derived: was given no explicit name, and can't generate one from given information.")) + (macro;fail "derived: was given no explicit name, and cannot generate one from given information.")) #let [impl (case ?custom-impl (#;Some custom-impl) custom-impl diff --git a/stdlib/source/lux/macro/poly/eq.lux b/stdlib/source/lux/macro/poly/eq.lux index a72fa85f6..a26566e79 100644 --- a/stdlib/source/lux/macro/poly/eq.lux +++ b/stdlib/source/lux/macro/poly/eq.lux @@ -109,5 +109,5 @@ ## Bound type-vars (poly;bound env :x:) ## If all else fails... - (macro;fail (format "Can't create Eq for: " (%type :x:))) + (macro;fail (format "Cannot create Eq for: " (%type :x:))) )))) diff --git a/stdlib/source/lux/macro/poly/functor.lux b/stdlib/source/lux/macro/poly/functor.lux index c90766c48..6e262f47e 100644 --- a/stdlib/source/lux/macro/poly/functor.lux +++ b/stdlib/source/lux/macro/poly/functor.lux @@ -126,6 +126,6 @@ (struct (def: ((~ g!map) (~ g!func) (~ g!input)) ((~ g!func) (~ g!input)))))))) ## Failure... - (macro;fail (format "Can't create Functor for: " (%type :x:))) + (macro;fail (format "Cannot create Functor for: " (%type :x:))) )) ))) diff --git a/stdlib/source/lux/macro/poly/text-encoder.lux b/stdlib/source/lux/macro/poly/text-encoder.lux index b0774ca64..21215d851 100644 --- a/stdlib/source/lux/macro/poly/text-encoder.lux +++ b/stdlib/source/lux/macro/poly/text-encoder.lux @@ -138,5 +138,5 @@ ## Bound type-variables (poly;bound env :x:) ## Failure... - (macro;fail (format "Can't create Text encoder for: " (%type :x:))) + (macro;fail (format "Cannot create Text encoder for: " (%type :x:))) )))) diff --git a/stdlib/source/lux/macro/syntax.lux b/stdlib/source/lux/macro/syntax.lux index 071e5716a..652130b97 100644 --- a/stdlib/source/lux/macro/syntax.lux +++ b/stdlib/source/lux/macro/syntax.lux @@ -95,12 +95,12 @@ (#;Right [tokens' x]) _ - (#;Left ($_ Text/append "Can't parse " (remaining-inputs tokens))))))] + (#;Left ($_ Text/append "Cannot parse " (remaining-inputs tokens))))))] [ bool Bool #;BoolS bool;Eq "bool"] [ nat Nat #;NatS number;Eq "nat"] [ int Int #;IntS number;Eq "int"] - [ deg Deg #;DegS number;Eq "deg"] + [ deg Deg #;DegS number;Eq "deg"] [ real Real #;RealS number;Eq "real"] [ char Char #;CharS char;Eq "char"] [ text Text #;TextS text;Eq "text"] @@ -167,7 +167,7 @@ (#;Right [tokens' x]) _ - (#;Left ($_ Text/append "Can't parse local " (remaining-inputs tokens))))))] + (#;Left ($_ Text/append "Cannot parse local " (remaining-inputs tokens))))))] [local-symbol #;SymbolS "symbol"] [ local-tag #;TagS "tag"] @@ -186,7 +186,7 @@ _ (#;Left ($_ Text/append "Syntax was expected to fully consume " (remaining-inputs tokens)))) _ - (#;Left ($_ Text/append "Can't parse " (remaining-inputs tokens))))))] + (#;Left ($_ Text/append "Cannot parse " (remaining-inputs tokens))))))] [ form #;FormS "form"] [tuple #;TupleS "tuple"] @@ -204,7 +204,7 @@ _ (#;Left ($_ Text/append "Syntax was expected to fully consume record" (remaining-inputs tokens)))) _ - (#;Left ($_ Text/append "Can't parse record" (remaining-inputs tokens)))))) + (#;Left ($_ Text/append "Cannot parse record" (remaining-inputs tokens)))))) (def: #export (opt p) {#;doc "Optionality combinator."} diff --git a/stdlib/source/lux/test.lux b/stdlib/source/lux/test.lux index 8d786920c..172d27376 100644 --- a/stdlib/source/lux/test.lux +++ b/stdlib/source/lux/test.lux @@ -92,7 +92,7 @@ (def: (repeat' seed times random-test) (-> Seed Nat (R;Random Test) Test) (if (n.= +0 times) - (fail "Can't try a test 0 times.") + (fail "Cannot try a test 0 times.") (do Monad [output (try seed random-test)] (case output diff --git a/stdlib/source/lux/type/auto.lux b/stdlib/source/lux/type/auto.lux index db19ad0aa..95e422b13 100644 --- a/stdlib/source/lux/type/auto.lux +++ b/stdlib/source/lux/type/auto.lux @@ -56,7 +56,7 @@ (#;AppT func arg) (case (type;apply-type func arg) #;None - (tc;fail (format "Can't apply type " (%type func) " to type " (%type arg))) + (tc;fail (format "Cannot apply type " (%type func) " to type " (%type arg))) (#;Some sig-type') (find-member-type idx sig-type')) @@ -69,7 +69,7 @@ _ (if (n.= +0 idx) (:: Monad wrap sig-type) - (tc;fail (format "Can't find member type " (%n idx) " for " (%type sig-type)))))) + (tc;fail (format "Cannot find member type " (%n idx) " for " (%type sig-type)))))) (def: (find-member-name member) (-> Ident (Lux Ident)) @@ -338,7 +338,7 @@ "(Functor List) map" (::: map n.inc (list;n.range +0 +9)) "Caveat emptor: You need to make sure to import the module of any structure you want to use." - "Otherwise, this macro won't find it.")} + "Otherwise, this macro will not find it.")} (case args (#;Left [args _]) (do @ diff --git a/stdlib/source/lux/type/check.lux b/stdlib/source/lux/type/check.lux index 6538af56b..73092a308 100644 --- a/stdlib/source/lux/type/check.lux +++ b/stdlib/source/lux/type/check.lux @@ -144,7 +144,7 @@ (function [context] (case (|> context (get@ #bindings) (dict;get id)) (#;Some (#;Some bound)) - (#;Left (format "Can't rebind type-var: " (%n id) " | Current type: " (%type bound))) + (#;Left (format "Cannot rebind type-var: " (%n id) " | Current type: " (%type bound))) (#;Some #;None) (#;Right [(update@ #bindings (dict;put id (#;Some type)) context) diff --git a/stdlib/test/test/lux/host.jvm.lux b/stdlib/test/test/lux/host.jvm.lux index 4bd96ad62..93fe5b5e6 100644 --- a/stdlib/test/test/lux/host.jvm.lux +++ b/stdlib/test/test/lux/host.jvm.lux @@ -82,14 +82,6 @@ (assert "Can run code in a \"synchronized\" block." (&;synchronized "" true)) - ## (assert "Can safely try risky code." - ## (and (case (&;try []) - ## (#;Right _) true - ## (#;Left _) false) - ## (case (&;try (_lux_proc ["jvm" "throw"] [(Exception.new "Uh, oh...")])) - ## (#;Right _) false - ## (#;Left _) true))) - (assert "Can access Class instances." (Text/= "java.lang.Class" (Class.getName [] (&;class-for java.lang.Class)))) -- cgit v1.2.3