Skip to content

Commit

Permalink
Work towards making the tests valid standalone files (see #80)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrosso committed May 17, 2024
1 parent 65e09be commit 37c6789
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion test/Axel/Test/Haskell/errors/Sourcemap1.axel_golden
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(module Sourcemap1)

(=macro test [] undefinedFunction)
(=macro test [] unit)

(test)
14 changes: 8 additions & 6 deletions test/Axel/Test/Haskell/errors/Sourcemap1.error_golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ While compiling 'Sourcemap1':

While expanding (test):

[47 of 48] Compiling AutogeneratedAxelMacroDefinitionAndEnvironment8691214048254095332 ( axelTemp/8691214048254095332/AutogeneratedAxelMacroDefinitionAndEnvironment8691214048254095332.hs, interpreted )
Variable not in scope:
undefinedFunction
:: AxelRuntime_GHCPrelude.IO
[AxelRuntime_AST.Expression AxelRuntime_Sourcemap.SourceMetadata]
The above message is in terms of the generated Haskell, at axelTemp/8691214048254095332/AutogeneratedAxelMacroDefinitionAndEnvironment8691214048254095332.hs:9:47.
[40 of 48] Compiling AutogeneratedAxelMacroDefinitionAndEnvironment3271698982841329388 ( axelTemp/3271698982841329388/AutogeneratedAxelMacroDefinitionAndEnvironment3271698982841329388.hs, interpreted )
• Couldn't match expected type ‘AxelRuntime_GHCPrelude.IO
[AxelRuntime_AST.Expression AxelRuntime_Sourcemap.SourceMetadata]’
with actual type ‘()’
• In the expression: ()
In an equation for ‘test_AXEL_AUTOGENERATED_MACRO_DEFINITION’:
test_AXEL_AUTOGENERATED_MACRO_DEFINITION [] = ()
The above message is in terms of the generated Haskell, at axelTemp/3271698982841329388/AutogeneratedAxelMacroDefinitionAndEnvironment3271698982841329388.hs:9:47.
Try checking at Sourcemap1:3:17.
If the Axel code at that position doesn't seem related, something may have gone wrong during a macro expansion.
Failed, 46 modules loaded.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

(=macro test ([x]) (pure [`(~x arg1 arg2)]))

(=macro test2 [] (test undefinedFunction))
(=macro test2 [] (test +))

(test2)
28 changes: 12 additions & 16 deletions test/Axel/Test/Haskell/errors/ThroughQuasiquote.error_golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@ While compiling 'ThroughQuasiquote':

While expanding (test2):

[49 of 50] Compiling AutogeneratedAxelMacroDefinitionAndEnvironment2198386876840781157 ( axelTemp/2198386876840781157/AutogeneratedAxelMacroDefinitionAndEnvironment2198386876840781157.hs, interpreted )
[42 of 50] Compiling AutogeneratedAxelMacroDefinitionAndEnvironment4444071668684652943 ( axelTemp/4444071668684652943/AutogeneratedAxelMacroDefinitionAndEnvironment4444071668684652943.hs, interpreted )
Variable not in scope:
undefinedFunction
:: t0
-> t1
-> IO
[AxelRuntime_AST.Expression AxelRuntime_Sourcemap.SourceMetadata]
The above message is in terms of the generated Haskell, at axelTemp/2198386876840781157/AutogeneratedAxelMacroDefinitionAndEnvironment2198386876840781157.hs:11:49.
Try checking at axelTemp/6713099704434341978/result.axel:1:2.
arg1
:: IO
[AxelRuntime_AST.Expression AxelRuntime_Sourcemap.SourceMetadata]
The above message is in terms of the generated Haskell, at axelTemp/4444071668684652943/AutogeneratedAxelMacroDefinitionAndEnvironment4444071668684652943.hs:11:53.
Try checking at axelTemp/7079426989737659938/result.axel:1:4.
If the Axel code at that position doesn't seem related, something may have gone wrong during a macro expansion.

Variable not in scope: arg1
The above message is in terms of the generated Haskell, at axelTemp/2198386876840781157/AutogeneratedAxelMacroDefinitionAndEnvironment2198386876840781157.hs:11:67.
Try checking at axelTemp/6713099704434341978/result.axel:1:20.
If the Axel code at that position doesn't seem related, something may have gone wrong during a macro expansion.

Variable not in scope: arg2
The above message is in terms of the generated Haskell, at axelTemp/2198386876840781157/AutogeneratedAxelMacroDefinitionAndEnvironment2198386876840781157.hs:11:72.
Try checking at axelTemp/6713099704434341978/result.axel:1:25.
Variable not in scope:
arg2
:: IO
[AxelRuntime_AST.Expression AxelRuntime_Sourcemap.SourceMetadata]
The above message is in terms of the generated Haskell, at axelTemp/4444071668684652943/AutogeneratedAxelMacroDefinitionAndEnvironment4444071668684652943.hs:11:58.
Try checking at axelTemp/7079426989737659938/result.axel:1:9.
If the Axel code at that position doesn't seem related, something may have gone wrong during a macro expansion.
Failed, 48 modules loaded.

0 comments on commit 37c6789

Please sign in to comment.