Skip to content
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

Add fromRational #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add fromRational #21

wants to merge 1 commit into from

Conversation

chreekat
Copy link

No description provided.

@bergmark
Copy link
Member

For anyone else who sees this: This is needed when you are using RebindableSyntax and OverloadedStrings with Double. Fay won't actually call this function, but the typechecker needs it in scope.

My mistake, but this implementation doesn't work, the implementation should be numerator / denominator, but doing that would require a cyclic dependency between Prelude and Data.Ratio.

We should put all the rationals/fractionals in Fay.Real (or Data.Real, not sure which is better, it's GHC.Real in GHC) to resolve this. And don't depend on Prelude from other fay-base modules.

This works as a fix in the meantime, as long as you don't explicitly call fromRational.

Thanks!

@bergmark
Copy link
Member

I experimented a bit with splitting up fay-base into modules, the more modules we add the slower compilation becomes. Since fay currently needs to recompile everything on each invocation I think it became too slow (this was a while ago so my memory is a bit hazy).

So i'm not completely sure how to proceed here... haskell-packages would solve the recompilation issue, but using it may have other drawbacks, it needs to be investigated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants