-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhelpful error message: "<unknown>:0:0: error: invalid type (see macro at x:y)" #36
Comments
I'm not sure of the best way to fix this, yet. The --print-expansions option makes it a bit easier to see the problem:
and should help more generally. However, the obvious thing to do as a result (remove one of the
since
which in turn will compile successfully. An alternative approach is to extract the list-node from
These aren't fixes for the core problem, though. One option is to make |
I'll try these workarounds out when I get home to my macbook. As for suggestions I think I would probably ellide excess parenthesis always so that So In this case I'm not sure what the best thing would be for Dale though, as I don't have a very intimate knowledge of it yet. This would also allow you to optionally write in a more consistent way when declaring types. Like you could say However I just realized that this doesn't work well with lisp syntax since EDIT: Actually I think the best of all solution is to just have a '(hello there dale)
`(hello there ,dale)
`a ; doesn't really make sense
'a ; makes perfect sense So the body of the internal macro would be: (quote (uq old)) I think? Either way if we can get that working then
You could also just redesign the behaviour of qq so that any time you want a list you have to manually put a list after the qq. So:
Becomes
That was the default behaviour I expected from qq anyway so I was confused when it required me to give it an atom. |
I think changing it as per your last suggestion (i.e. no implicit parentheses) is probably the best way to go, so I'll try that out and see how it goes. |
I agree, I suppose there will be a lot of ripples to refactor when doing that, but it should be fairly easy to automate. Looking forward to testing it out :) |
I ended up adding |
That still leaves the unhelpful error message, though, so this will stay open for the time being. |
The error messages produced on compiling the original program are now:
Filenames are preserved by the |
This code:
Is probably incorrect somehow. But it's hard to tell why when the compiler reports:
I know that
(cstring)
is probably the part that is giving an invalid type, and that it's on that line. However it would be helpful if the compiler told me what the invalid type actually turned out to be, instead of telling me to look at the macro. Because I can't figure it out, hehe.The text was updated successfully, but these errors were encountered: