From 4ca397765805eda5ddee393901ed3a02001a960a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 25 Dec 2020 09:22:38 -0400 Subject: Replaced kebab-case with snake_case for naming convention. --- stdlib/source/test/aedifex/parser.lux | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'stdlib/source/test/aedifex/parser.lux') diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux index 7aeff7a18..1eb62b75d 100644 --- a/stdlib/source/test/aedifex/parser.lux +++ b/stdlib/source/test/aedifex/parser.lux @@ -36,32 +36,32 @@ (Random //.Name) (random.ascii/alpha 1)) -(def: (list-of random) +(def: (list_of random) (All [a] (-> (Random a) (Random (List a)))) (do {! random.monad} [size (\ ! map (n.% 5) random.nat)] (random.list size random))) -(def: (dictionary-of key-hash key-random value-random) +(def: (dictionary_of key_hash key_random value_random) (All [k v] (-> (Hash k) (Random k) (Random v) (Random (Dictionary k v)))) (\ random.functor map - (dictionary.from-list key-hash) - (..list-of (random.and key-random value-random)))) + (dictionary.from_list key_hash) + (..list_of (random.and key_random value_random)))) (def: random (Random Project) - (..dictionary-of text.hash ..name @profile.random)) + (..dictionary_of text.hash ..name @profile.random)) -(def: with-default-sources +(def: with_default_sources (-> //.Profile //.Profile) (update@ #//.sources (: (-> (Set //.Source) (Set //.Source)) (function (_ sources) (if (set.empty? sources) - (set.from-list text.hash (list //.default-source)) + (set.from_list text.hash (list //.default_source)) sources))))) -(def: single-profile +(def: single_profile Test (do random.monad [expected @profile.random] @@ -72,20 +72,20 @@ (.run /.project) (case> (#try.Success actual) (|> expected - ..with-default-sources + ..with_default_sources (//project.project //.default) (\ //project.equivalence = actual)) (#try.Failure error) false))))) -(def: (with-empty-profile project) +(def: (with_empty_profile project) (-> Project Project) (if (dictionary.empty? project) (//project.project //.default (\ //.monoid identity)) project)) -(def: multiple-profiles +(def: multiple_profiles Test (do random.monad [expected ..random] @@ -96,11 +96,11 @@ (.run /.project) (case> (#try.Success actual) (|> expected - ..with-empty-profile + ..with_empty_profile dictionary.entries (list\map (function (_ [name profile]) - [name (..with-default-sources profile)])) - (dictionary.from-list text.hash) + [name (..with_default_sources profile)])) + (dictionary.from_list text.hash) (\ //project.equivalence = actual)) (#try.Failure error) @@ -113,6 +113,6 @@ (_.for [/.project //format.Format //format.profile //format.project] ($_ _.and - ..single-profile - ..multiple-profiles + ..single_profile + ..multiple_profiles )))) -- cgit v1.2.3