Closed schnecki closed 6 years ago
There might be some bug with qualified exports or imports, did you try import Prelude hiding ((>>=), return)
and importing yours unqualified to see if that works? Might not be what you want but it'd help diagnose the issue.
The parse error from P.>>=
could also be because of limitations in haskell-src-exts. IIRC it only handles fixities for operators in base
and it might not consider P.>>=
the same as >>=
. The consequence of this limitation is also that you can't define a custom fixity for e.g. your >>=
, but I don't think you want to do that anyway. Using unqualified imports might resolve this issue as well.
Unqualified imports worked.
It seems like Fay is not correctly exporting some infix operators and functions like return. I have a simple Parser library, where (as we have no type classes) I export e.g. bind directly and use it in desugared style. However, the bind operator does not work outside the module, whereas inside it works and once I change the
(>>=)
operator to the namebind
it compiles correctly. Btw GHC compiles the file in all variants (for the Haskell server side implementation).Similarly I cannot export a function named
return
:If I change the name it works. Are there different keywords in Fay?