-
Notifications
You must be signed in to change notification settings - Fork 41
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
snd $
compiles incorrectly
#273
Comments
I'm investigating this issue at the moment. If one ignores the gratuitous eta-contraction and eta-expansion Agda does for a moment, the real issue seems to be with pretty-printing of sections. We generate a For lambdas specifically this is only a problem for left sections, but here is a similar issue with right sections (not involving lambdas): test6 : Int → Int
test6 = _- (1 + 1)
{-# COMPILE AGDA2HS test6 #-} gets compiled to the (type-incorrect) test6 :: Int -> Int
test6 = (- 1 + 1) I am trying to work around the pretty-printer by manually inserting more @flupe proposed in #274 to switch to |
Related: #54 |
Fair enough. I think that the main focus of
Personally, I wouldn't recommend depending on |
In the readme for |
Sure. What I mean is that I'm more concerned about forward-portability — when GHC 10.2 is released, will |
I think there are two issues:
I don't think these need to be the same version. In the first case we would have to rely on any libraries being compatible with a new version of ghc. I understand you point to be that despite the fact that haskell-src-exts is unmaintained (/on 'life support') and would not support any new syntax introduced in a new version, as it is more loosely coupled it's more likely to continue to be compatible with new versions of ghc than the better maintained but more tightly coupled ghc-source-gen. In the second case I don't see such an issue as the new version of ghc is likely to continue to compatible with the syntax of earlier versions. |
Yes, that is what I was trying to say. 👍 Just my two cents, though, not my decision. |
thanks! We're looking at the pros and cons. |
There seems to be an issue when compiling the function application operator
$
together withsnd
:The file
is compiled to
which is not valid Haskell.
Apparently, something went wrong with the fixity of
$
and the compilation ofsnd
(Agda) to\ r -> snd r
(Haskell). It appears to me that a parentheses are missing, a good compilation output would beAgda2hs version:
github:agda/agda2hs?ref=v1.2
The text was updated successfully, but these errors were encountered: