diff --git a/src/stages/adt_generator/adt_generator.ml b/src/stages/adt_generator/adt_generator.ml index 840fe1b02..f96857f7b 100644 --- a/src/stages/adt_generator/adt_generator.ml +++ b/src/stages/adt_generator/adt_generator.ml @@ -1,2 +1 @@ -module Amodule = Amodule -module Use_a_fold = Use_a_fold +module Generic = Generic diff --git a/src/stages/adt_generator/dune b/src/stages/adt_generator/dune index 4d7d78239..0e1a15f71 100644 --- a/src/stages/adt_generator/dune +++ b/src/stages/adt_generator/dune @@ -1,24 +1,6 @@ -(rule - (target generated_fold.ml) - (deps generator.raku amodule.ml) - (action (with-stdout-to generated_fold.ml (run perl6 ./generator.raku amodule.ml))) -; (mode (promote (until-clean))) -) -; (library -; (name adt_generator) -; (public_name ligo.adt_generator) -; (libraries -; ) -; ) - -(executable +(library (name adt_generator) (public_name ligo.adt_generator) (libraries ) ) - -(alias - (name runtest) - (action (run ./adt_generator.exe)) -) diff --git a/src/stages/adt_generator/generator.raku b/src/stages/adt_generator/generator.raku index f3a5ec6ca..555e98f22 100644 --- a/src/stages/adt_generator/generator.raku +++ b/src/stages/adt_generator/generator.raku @@ -140,7 +140,7 @@ for $statements -> $statement { say "$statement" } say "open $moduleName"; -say "module Adt_info = Generic.Adt_info"; +say "module Adt_info = Adt_generator.Generic.Adt_info"; say ""; for $adts.kv -> $index, $t { diff --git a/src/stages/adt_generator/amodule.ml b/src/test/adt_generator/amodule.ml similarity index 100% rename from src/stages/adt_generator/amodule.ml rename to src/test/adt_generator/amodule.ml diff --git a/src/stages/adt_generator/amodule_utils.ml b/src/test/adt_generator/amodule_utils.ml similarity index 100% rename from src/stages/adt_generator/amodule_utils.ml rename to src/test/adt_generator/amodule_utils.ml diff --git a/src/test/adt_generator/dune b/src/test/adt_generator/dune new file mode 100644 index 000000000..679b3a0fd --- /dev/null +++ b/src/test/adt_generator/dune @@ -0,0 +1,17 @@ +(rule + (target generated_fold.ml) + (deps ../../../src/stages/adt_generator/generator.raku amodule.ml) + (action (with-stdout-to generated_fold.ml (run perl6 ../../../src/stages/adt_generator/generator.raku amodule.ml))) +; (mode (promote (until-clean))) +) + +(executable + (name test_adt_generator) + (public_name ligo.test_adt_generator) + (libraries adt_generator) +) + +(alias + (name runtest) + (action (run ./test_adt_generator.exe)) +) diff --git a/src/stages/adt_generator/fold.ml b/src/test/adt_generator/fold.ml similarity index 100% rename from src/stages/adt_generator/fold.ml rename to src/test/adt_generator/fold.ml diff --git a/src/test/adt_generator/test_adt_generator.ml b/src/test/adt_generator/test_adt_generator.ml new file mode 100644 index 000000000..840fe1b02 --- /dev/null +++ b/src/test/adt_generator/test_adt_generator.ml @@ -0,0 +1,2 @@ +module Amodule = Amodule +module Use_a_fold = Use_a_fold diff --git a/src/stages/adt_generator/use_a_fold.ml b/src/test/adt_generator/use_a_fold.ml similarity index 100% rename from src/stages/adt_generator/use_a_fold.ml rename to src/test/adt_generator/use_a_fold.ml