diff --git a/scripts/onHsFiles.sh b/scripts/onHsFiles.sh index 70d5763..cc06930 100755 --- a/scripts/onHsFiles.sh +++ b/scripts/onHsFiles.sh @@ -1 +1 @@ -find app src test -iname "*.hs" ! -path "app/Main.hs" ! -path "src/Axel/Parse/Args.hs" ! -path "src/Axel.hs" ! -path "src/Axel/Haskell/Macros.hs" -print0 | xargs -0 "$@" +find app src test -iname "*.hs" ! -path "app/Main.hs" ! -path "src/Axel/Parse/Args.hs" ! -path "src/Axel.hs" ! -path "src/Axel/Haskell/Macros.hs" ! -name "golden_*.hs" -print0 | xargs -0 "$@" diff --git a/test/Axel/Test/Transpilation/TranspilationSpec.hs b/test/Axel/Test/Transpilation/TranspilationSpec.hs index 3784369..8616bee 100644 --- a/test/Axel/Test/Transpilation/TranspilationSpec.hs +++ b/test/Axel/Test/Transpilation/TranspilationSpec.hs @@ -45,21 +45,19 @@ test_transpilation_golden :: IO TestTree test_transpilation_golden = do axelFiles <- map (FilePath . T.pack) <$> - findByExtension [".axel_golden"] "test/Axel/Test/Transpilation" + findByExtension [".axel"] "test/Axel/Test/Transpilation" pure $ testGroup "transpilation golden tests" $ do axelFile <- axelFiles - let hsFile = replaceExtension axelFile "hs_golden" + let hsFile = replaceExtension axelFile "hs" let transpiled = do axelSource <- T.readFile $ T.unpack (op FilePath axelFile) output <- runApp $ - Eff.evalState (M.empty :: ModuleInfo) $ + Eff.evalState (M.empty :: SM.ModuleInfo) $ Ghci.withGhci $ transpileSource (takeBaseName axelFile) axelSource let newSource = encodeUtf8Lazy $ SM.raw output pure $ newSource <> "\n" + let testName = T.unpack . op FilePath $ takeBaseName axelFile pure $ - goldenVsString - (T.unpack . op FilePath $ takeBaseName axelFile) - (T.unpack . op FilePath $ hsFile) - transpiled + goldenVsString testName (T.unpack . op FilePath $ hsFile) transpiled diff --git a/test/Axel/Test/Transpilation/macros/ExpandIntoInterdependentMacros.hs_golden b/test/Axel/Test/Transpilation/macros/ExpandIntoInterdependentMacros.hs_golden deleted file mode 100644 index e3894c1..0000000 --- a/test/Axel/Test/Transpilation/macros/ExpandIntoInterdependentMacros.hs_golden +++ /dev/null @@ -1,15 +0,0 @@ -module ExpandIntoInterdependentMacros where -import Axel -import qualified Prelude as GHCPrelude -import qualified Axel.Parse.AST as AST -import Axel.Prelude -shouldExist :: () => (IO ()) -shouldExist = (pure ()) -generateMacroChain_AXEL_AUTOGENERATED_MACRO_DEFINITION [(AST.Symbol ann macro)] = (pure (let {macro1 = ((<>) macro "1");macro2 = ((<>) macro "2");macro3 = ((<>) macro "3")} in [(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 9 7))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 282))) "defmacro")],[(AST.Symbol ann macro1)],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 10 8))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 10 9))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 522))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 10 12))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 636))) "pure")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 10 18))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 746))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 11 38))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 856))) "quote")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 10 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 967))) "def")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 974))) "shouldExist")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 10 37))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 10 38))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 1193))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 10 41))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 1307))) "IO")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 1313))) "Unit")]]))]]))],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 11 21))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 11 22))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 1533))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 11 25))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 1647))) "pure")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 1655))) "unit")]]))]]))]]))]]))]]))]]))]]))]])),(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 12 7))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 1794))) "defmacro")],[(AST.Symbol ann macro2)],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 8))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 9))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2034))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 12))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2148))) "pure")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 18))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2258))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2368))) "AST.SExpression")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2433))) "GHCPrelude.Just")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2498))) ",")],[(AST.LiteralString (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2503))) "ExpandIntoInterdependentMacros")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2585))) "SM.Position")],[(AST.LiteralInt (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2600))) 13)],[(AST.LiteralInt (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2606))) 20)]]))]]))]]))],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2726))) "concat")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2838))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 47))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 2948))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 47))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 3058))) "quote")],[(AST.Symbol ann macro1)]]))]]))]]))]]))]]))]]))]]))]]))]])),(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 14 7))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 3228))) "defmacro")],[(AST.Symbol ann macro3)],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 8))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 9))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 3468))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 12))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 3582))) "pure")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 18))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 3692))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 3802))) "AST.SExpression")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 3867))) "GHCPrelude.Just")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 3932))) ",")],[(AST.LiteralString (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 3937))) "ExpandIntoInterdependentMacros")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 4019))) "SM.Position")],[(AST.LiteralInt (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 4034))) 15)],[(AST.LiteralInt (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 4040))) 20)]]))]]))]]))],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 4160))) "concat")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 4272))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 47))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 4382))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 47))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/627443008510088540/result.axel" (SM.Position 1 4492))) "quote")],[(AST.Symbol ann macro2)]]))]]))]]))]]))]]))]]))]]))]]))]]))])) -macros1_AXEL_AUTOGENERATED_MACRO_DEFINITION [] = (pure [(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 1 1))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 1 2))) "::"),(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 1 5))) "shouldExist"),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 1 17))) [(AST.Symbol GHCPrelude.Nothing "list")]),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 1 20))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 1 21))) "IO"),(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 1 24))) "Unit")])]),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 2 1))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 2 2))) "="),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 2 4))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 2 5))) "shouldExist")]),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 2 18))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 2 19))) "pure"),(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/5366504242101635470/result.axel" (SM.Position 2 24))) "unit")])])]) -macros2_AXEL_AUTOGENERATED_MACRO_DEFINITION [] = (pure [(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 13 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2870339246997929923/result.axel" (SM.Position 1 159))) "macros1")]]))]) -macros3_AXEL_AUTOGENERATED_MACRO_DEFINITION [] = (pure [(AST.SExpression (GHCPrelude.Just ((,) "ExpandIntoInterdependentMacros" (SM.Position 15 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4984134707978226572/result.axel" (SM.Position 1 159))) "macros2")]]))]) -generateMacroChain_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] -macros1_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] -macros2_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] -macros3_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] diff --git a/test/Axel/Test/Transpilation/macros/Quasiquote.hs_golden b/test/Axel/Test/Transpilation/macros/Quasiquote.hs_golden deleted file mode 100644 index ae1ef02..0000000 --- a/test/Axel/Test/Transpilation/macros/Quasiquote.hs_golden +++ /dev/null @@ -1,19 +0,0 @@ -module Quasiquote where -import Axel -import qualified Prelude as GHCPrelude -import qualified Axel.Parse.AST as AST -import Axel.Prelude -import qualified Axel.Parse.AST as AST -import qualified Axel.Sourcemap as SM -assertEq :: () => ((->) (AST.Expression a) ((->) (AST.Expression b) SM.Expression)) -assertEq expr expected = (aXEL_SYMBOL_IF_ ((==) ((<$) () expr) ((<$) () expected)) (AST.SExpression (GHCPrelude.Just ((,) "axelTemp/6266692311774218539/result.axel" (SM.Position 2 86))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/6266692311774218539/result.axel" (SM.Position 2 86))) "raw"),(AST.LiteralString (GHCPrelude.Just ((,) "axelTemp/6266692311774218539/result.axel" (SM.Position 2 86))) "-- Passed!")]) (error ((<>) (AST.toAxel expr) ((<>) " given, but " ((<>) (AST.toAxel expected) " expected!"))))) -sym :: () => ((->) String SM.Expression) -sym x = (AST.Symbol Nothing x) -sexp :: () => ((->) ([] SM.Expression) SM.Expression) -sexp xs = (AST.SExpression Nothing xs) --- Passed! --- Passed! --- Passed! --- Passed! -testQuasiquote_AXEL_AUTOGENERATED_MACRO_DEFINITION _ = (pure [(assertEq (AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 73))) "topLevelBasic") (sym "topLevelBasic")),(assertEq (AST.SExpression (GHCPrelude.Just ((,) "Quasiquote" (SM.Position 27 30))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 203))) "quote")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 212))) "topLevelQuote")]])) (sexp [(sym "quote"),(sym "topLevelQuote")])),(assertEq (AST.SExpression (GHCPrelude.Just ((,) "Quasiquote" (SM.Position 29 16))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 369))) "\\")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 374))) "inFormBasic")],[(sym "inFormUnquote")],(AST.toExpressionList [(sym "inFormSpliceUnquote1"),(sym "inFormSpliceUnquote2")]),[(AST.SExpression (GHCPrelude.Just ((,) "Quasiquote" (SM.Position 29 128))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 579))) "quote")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 588))) "inFormQuote")]]))]])) (sexp [(sym "\\"),(sym "inFormBasic"),(sym "inFormUnquote"),(sym "inFormSpliceUnquote1"),(sym "inFormSpliceUnquote2"),(sexp [(sym "quote"),(sym "inFormQuote")])])),(assertEq (AST.SExpression (GHCPrelude.Just ((,) "Quasiquote" (SM.Position 31 16))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "Quasiquote" (SM.Position 31 17))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 947))) "inForm2Basic")],[(sym "inForm2Unquote")],(AST.toExpressionList [(sym "inForm2SpliceUnquote1"),(sym "inForm2SpliceUnquote2")]),[(AST.SExpression (GHCPrelude.Just ((,) "Quasiquote" (SM.Position 31 132))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 1156))) "quote")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2799541504526618217/result.axel" (SM.Position 1 1165))) "inForm2Quote")]]))]]))]])) (sexp [(sexp [(sym "inForm2Basic"),(sym "inForm2Unquote"),(sym "inForm2SpliceUnquote1"),(sym "inForm2SpliceUnquote2"),(sexp [(sym "quote"),(sym "inForm2Quote")])])]))]) -testQuasiquote_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] diff --git a/test/Axel/Test/Transpilation/macros/ExpandIntoInterdependentMacros.axel_golden b/test/Axel/Test/Transpilation/macros/golden_ExpandIntoInterdependentMacros.axel similarity index 100% rename from test/Axel/Test/Transpilation/macros/ExpandIntoInterdependentMacros.axel_golden rename to test/Axel/Test/Transpilation/macros/golden_ExpandIntoInterdependentMacros.axel diff --git a/test/Axel/Test/Transpilation/macros/golden_ExpandIntoInterdependentMacros.hs b/test/Axel/Test/Transpilation/macros/golden_ExpandIntoInterdependentMacros.hs new file mode 100644 index 0000000..7e4416d --- /dev/null +++ b/test/Axel/Test/Transpilation/macros/golden_ExpandIntoInterdependentMacros.hs @@ -0,0 +1,15 @@ +module ExpandIntoInterdependentMacros where +import Axel +import qualified Prelude as GHCPrelude +import qualified Axel.Parse.AST as AST +import Axel.Prelude +shouldExist :: () => (IO ()) +shouldExist = (pure ()) +generateMacroChain_AXEL_AUTOGENERATED_MACRO_DEFINITION [(AST.Symbol ann macro)] = (pure (let {macro1 = ((<>) macro "1");macro2 = ((<>) macro "2");macro3 = ((<>) macro "3")} in [(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 9 7))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 289))) "defmacro")],[(AST.Symbol ann macro1)],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 10 8))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 10 9))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 543))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 10 12))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 664))) "pure")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 10 18))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 781))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 11 38))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 898))) "quote")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 10 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 1016))) "def")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 1023))) "shouldExist")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 10 37))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 10 38))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 1256))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 10 41))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 1377))) "IO")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 1383))) "Unit")]]))]]))],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 11 21))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 11 22))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 1617))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 11 25))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 1738))) "pure")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 1746))) "unit")]]))]]))]]))]]))]]))]]))]]))]])),(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 12 7))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 1892))) "defmacro")],[(AST.Symbol ann macro2)],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 8))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 9))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2146))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 12))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2267))) "pure")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 18))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2384))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2501))) "AST.SExpression")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2566))) "GHCPrelude.Just")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2631))) ",")],[(AST.LiteralString (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2636))) "golden_ExpandIntoInterdependentMacros")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2725))) "SM.Position")],[(AST.LiteralInt (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2740))) 13)],[(AST.LiteralInt (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2746))) 20)]]))]]))]]))],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2873))) "concat")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 2992))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 47))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 3109))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 47))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 3226))) "quote")],[(AST.Symbol ann macro1)]]))]]))]]))]]))]]))]]))]]))]]))]])),(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 14 7))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 3403))) "defmacro")],[(AST.Symbol ann macro3)],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 8))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 9))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 3657))) "list")]]))],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 12))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 3778))) "pure")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 18))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 3895))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4012))) "AST.SExpression")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4077))) "GHCPrelude.Just")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4142))) ",")],[(AST.LiteralString (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4147))) "golden_ExpandIntoInterdependentMacros")],[(AST.SExpression GHCPrelude.Nothing (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4236))) "SM.Position")],[(AST.LiteralInt (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4251))) 15)],[(AST.LiteralInt (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4257))) 20)]]))]]))]]))],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4384))) "concat")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4503))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 47))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4620))) "list")],[(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 47))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1508974868586227362/result.axel" (SM.Position 1 4737))) "quote")],[(AST.Symbol ann macro2)]]))]]))]]))]]))]]))]]))]]))]]))]]))])) +macros1_AXEL_AUTOGENERATED_MACRO_DEFINITION [] = (pure [(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 1 1))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 1 2))) "::"),(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 1 5))) "shouldExist"),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 1 17))) [(AST.Symbol GHCPrelude.Nothing "list")]),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 1 20))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 1 21))) "IO"),(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 1 24))) "Unit")])]),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 2 1))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 2 2))) "="),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 2 4))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 2 5))) "shouldExist")]),(AST.SExpression (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 2 18))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 2 19))) "pure"),(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/8322265170428161891/result.axel" (SM.Position 2 24))) "unit")])])]) +macros2_AXEL_AUTOGENERATED_MACRO_DEFINITION [] = (pure [(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 13 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/6774190842878730163/result.axel" (SM.Position 1 166))) "macros1")]]))]) +macros3_AXEL_AUTOGENERATED_MACRO_DEFINITION [] = (pure [(AST.SExpression (GHCPrelude.Just ((,) "golden_ExpandIntoInterdependentMacros" (SM.Position 15 20))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/1643648512022641200/result.axel" (SM.Position 1 166))) "macros2")]]))]) +generateMacroChain_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] +macros1_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] +macros2_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] +macros3_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] diff --git a/test/Axel/Test/Transpilation/macros/Quasiquote.axel_golden b/test/Axel/Test/Transpilation/macros/golden_Quasiquote.axel similarity index 100% rename from test/Axel/Test/Transpilation/macros/Quasiquote.axel_golden rename to test/Axel/Test/Transpilation/macros/golden_Quasiquote.axel diff --git a/test/Axel/Test/Transpilation/macros/golden_Quasiquote.hs b/test/Axel/Test/Transpilation/macros/golden_Quasiquote.hs new file mode 100644 index 0000000..c5dbba7 --- /dev/null +++ b/test/Axel/Test/Transpilation/macros/golden_Quasiquote.hs @@ -0,0 +1,19 @@ +module Quasiquote where +import Axel +import qualified Prelude as GHCPrelude +import qualified Axel.Parse.AST as AST +import Axel.Prelude +import qualified Axel.Parse.AST as AST +import qualified Axel.Sourcemap as SM +assertEq :: () => ((->) (AST.Expression a) ((->) (AST.Expression b) SM.Expression)) +assertEq expr expected = (aXEL_SYMBOL_IF_ ((==) ((<$) () expr) ((<$) () expected)) (AST.SExpression (GHCPrelude.Just ((,) "axelTemp/2948473737463148627/result.axel" (SM.Position 2 86))) [(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/2948473737463148627/result.axel" (SM.Position 2 86))) "raw"),(AST.LiteralString (GHCPrelude.Just ((,) "axelTemp/2948473737463148627/result.axel" (SM.Position 2 86))) "-- Passed!")]) (error ((<>) (AST.toAxel expr) ((<>) " given, but " ((<>) (AST.toAxel expected) " expected!"))))) +sym :: () => ((->) String SM.Expression) +sym x = (AST.Symbol Nothing x) +sexp :: () => ((->) ([] SM.Expression) SM.Expression) +sexp xs = (AST.SExpression Nothing xs) +-- Passed! +-- Passed! +-- Passed! +-- Passed! +testQuasiquote_AXEL_AUTOGENERATED_MACRO_DEFINITION _ = (pure [(assertEq (AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 73))) "topLevelBasic") (sym "topLevelBasic")),(assertEq (AST.SExpression (GHCPrelude.Just ((,) "golden_Quasiquote" (SM.Position 27 30))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 210))) "quote")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 219))) "topLevelQuote")]])) (sexp [(sym "quote"),(sym "topLevelQuote")])),(assertEq (AST.SExpression (GHCPrelude.Just ((,) "golden_Quasiquote" (SM.Position 29 16))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 383))) "\\")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 388))) "inFormBasic")],[(sym "inFormUnquote")],(AST.toExpressionList [(sym "inFormSpliceUnquote1"),(sym "inFormSpliceUnquote2")]),[(AST.SExpression (GHCPrelude.Just ((,) "golden_Quasiquote" (SM.Position 29 128))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 600))) "quote")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 609))) "inFormQuote")]]))]])) (sexp [(sym "\\"),(sym "inFormBasic"),(sym "inFormUnquote"),(sym "inFormSpliceUnquote1"),(sym "inFormSpliceUnquote2"),(sexp [(sym "quote"),(sym "inFormQuote")])])),(assertEq (AST.SExpression (GHCPrelude.Just ((,) "golden_Quasiquote" (SM.Position 31 16))) (concat [[(AST.SExpression (GHCPrelude.Just ((,) "golden_Quasiquote" (SM.Position 31 17))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 982))) "inForm2Basic")],[(sym "inForm2Unquote")],(AST.toExpressionList [(sym "inForm2SpliceUnquote1"),(sym "inForm2SpliceUnquote2")]),[(AST.SExpression (GHCPrelude.Just ((,) "golden_Quasiquote" (SM.Position 31 132))) (concat [[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 1198))) "quote")],[(AST.Symbol (GHCPrelude.Just ((,) "axelTemp/4388616380899794166/result.axel" (SM.Position 1 1207))) "inForm2Quote")]]))]]))]])) (sexp [(sexp [(sym "inForm2Basic"),(sym "inForm2Unquote"),(sym "inForm2SpliceUnquote1"),(sym "inForm2SpliceUnquote2"),(sexp [(sym "quote"),(sym "inForm2Quote")])])]))]) +testQuasiquote_AXEL_AUTOGENERATED_MACRO_DEFINITION :: [AST.Expression SM.SourceMetadata] -> GHCPrelude.IO [AST.Expression SM.SourceMetadata] diff --git a/test/Axel/Test/Transpilation/regression/Issue79.axel_golden b/test/Axel/Test/Transpilation/regression/golden_Issue79.axel similarity index 100% rename from test/Axel/Test/Transpilation/regression/Issue79.axel_golden rename to test/Axel/Test/Transpilation/regression/golden_Issue79.axel diff --git a/test/Axel/Test/Transpilation/regression/Issue79.hs_golden b/test/Axel/Test/Transpilation/regression/golden_Issue79.hs similarity index 100% rename from test/Axel/Test/Transpilation/regression/Issue79.hs_golden rename to test/Axel/Test/Transpilation/regression/golden_Issue79.hs diff --git a/test/Axel/Test/Transpilation/syntax/CaseSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_CaseSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/CaseSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_CaseSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/CaseSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_CaseSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/CaseSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_CaseSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/CommentSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_CommentSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/CommentSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_CommentSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/CommentSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_CommentSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/CommentSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_CommentSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/DataDefinitionSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_DataDefinitionSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/DataDefinitionSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_DataDefinitionSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/DataDefinitionSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_DataDefinitionSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/DataDefinitionSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_DataDefinitionSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/FunctionDefinitionSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_FunctionDefinitionSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/FunctionDefinitionSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_FunctionDefinitionSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/FunctionDefinitionSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_FunctionDefinitionSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/FunctionDefinitionSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_FunctionDefinitionSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/ImportSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_ImportSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/ImportSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_ImportSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/ImportSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_ImportSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/ImportSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_ImportSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/LambdaSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_LambdaSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/LambdaSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_LambdaSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/LambdaSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_LambdaSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/LambdaSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_LambdaSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/LetSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_LetSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/LetSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_LetSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/LetSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_LetSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/LetSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_LetSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/ListSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_ListSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/ListSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_ListSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/ListSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_ListSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/ListSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_ListSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/ModuleSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_ModuleSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/ModuleSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_ModuleSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/ModuleSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_ModuleSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/ModuleSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_ModuleSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/NewtypeDefinitionSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_NewtypeDefinitionSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/NewtypeDefinitionSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_NewtypeDefinitionSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/NewtypeDefinitionSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_NewtypeDefinitionSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/NewtypeDefinitionSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_NewtypeDefinitionSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/OperatorSectionSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_OperatorSectionSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/OperatorSectionSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_OperatorSectionSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/OperatorSectionSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_OperatorSectionSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/OperatorSectionSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_OperatorSectionSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/PatternBinding.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_PatternBinding.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/PatternBinding.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_PatternBinding.axel diff --git a/test/Axel/Test/Transpilation/syntax/PatternBinding.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_PatternBinding.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/PatternBinding.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_PatternBinding.hs diff --git a/test/Axel/Test/Transpilation/syntax/PragmaSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_PragmaSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/PragmaSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_PragmaSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/PragmaSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_PragmaSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/PragmaSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_PragmaSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/RawSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_RawSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/RawSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_RawSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/RawSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_RawSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/RawSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_RawSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/RecordSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_RecordSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/RecordSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_RecordSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/RecordSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_RecordSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/RecordSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_RecordSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/StringSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_StringSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/StringSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_StringSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/StringSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_StringSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/StringSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_StringSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/TypeClassDefinitionSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_TypeClassDefinitionSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/TypeClassDefinitionSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_TypeClassDefinitionSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/TypeClassDefinitionSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_TypeClassDefinitionSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/TypeClassDefinitionSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_TypeClassDefinitionSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/TypeClassInstanceSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_TypeClassInstanceSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/TypeClassInstanceSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_TypeClassInstanceSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/TypeClassInstanceSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_TypeClassInstanceSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/TypeClassInstanceSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_TypeClassInstanceSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/TypeSignatureSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_TypeSignatureSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/TypeSignatureSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_TypeSignatureSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/TypeSignatureSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_TypeSignatureSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/TypeSignatureSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_TypeSignatureSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/TypeSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_TypeSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/TypeSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_TypeSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/TypeSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_TypeSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/TypeSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_TypeSyntax.hs diff --git a/test/Axel/Test/Transpilation/syntax/UnitSyntax.axel_golden b/test/Axel/Test/Transpilation/syntax/golden_UnitSyntax.axel similarity index 100% rename from test/Axel/Test/Transpilation/syntax/UnitSyntax.axel_golden rename to test/Axel/Test/Transpilation/syntax/golden_UnitSyntax.axel diff --git a/test/Axel/Test/Transpilation/syntax/UnitSyntax.hs_golden b/test/Axel/Test/Transpilation/syntax/golden_UnitSyntax.hs similarity index 100% rename from test/Axel/Test/Transpilation/syntax/UnitSyntax.hs_golden rename to test/Axel/Test/Transpilation/syntax/golden_UnitSyntax.hs