-
Notifications
You must be signed in to change notification settings - Fork 103
Make it compile with MicroHs #544
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
base: master
Are you sure you want to change the base?
Conversation
|
Nice! Yes, please add CI. Have you gotten QuickCheck to compile yet? If so, it would be great to run the test suite (here and for |
Data/HashMap/Internal.hs
Outdated
|
|
||
| #if defined(__MHS__) | ||
| import Data.Traversable | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is okay, but also blecherous. We actually want to switch on the "base library" variant, not the compiler. Do you know if there's been any progress on how to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to test for specific features in base.
In this case we could always import Data.Traversable; it's harmless for GHC. (It might need reordering of imports to avoid warnings. I'll check.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the condition is totally acceptable for this PR; I just think it would be good to open up a community discussion about the broader issue.
|
I'll update the PR. And I'll check if the testing works. |
|
MicroHs does not have unlifted types. But it supports the syntax, and you get the lifted types instead. Of course, that's not as efficient, but at least it allows more packages to build (e.g. async needs u-c) There's a new package for MicroHs called ghc-compat which implements parts of ghc specific modules. I will flesh it out as I need more things. |
| ) where | ||
|
|
||
| import Data.Traversable -- MicroHs needs this since its Prelude does not have Foldable&Traversable. | ||
| -- It's harmless for GHC, and putting it first avoid a warning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| -- It's harmless for GHC, and putting it first avoid a warning. | |
| -- It's harmless for GHC, and putting it first avoids a warning. |
|
Would you please rebase? |
|
I'll rebase when I've added CI. |
The title says it all.
I can add MicroHs CI if you want.