-
Notifications
You must be signed in to change notification settings - Fork 21
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
Variant that uses no GHC-specific extensions / functions #5
Comments
I didn't try it, but ST is in the UHC repository: https://github.com/uhc/uhc/blob/master/EHC/ehclib/base/Control/Monad/ST.hs |
@sjoerdvisscher Nice! The package now uses GHC-specific extensions only when they are available. Furthermore, I have included a module |
For posterity, there is also a package http://hackage.haskell.org/package/statethread that implements the |
This variant works fine with UHC. I did one extra tweak to vault's codebase: change Integer to Int in Data/Unique/Really.hs As javascript's Int is 53bit according to the ECMA standard (independent if the host platform is 32 or 64 bit) , this is more than enough for my needs. But I don't expect vault to follow this, as this might be problematic on a 32bit architecture. |
Great! We can make a CPP conditional for the |
What would the condition be? "if UHC" doesn't seem right. I don't know if there's a macro for On Tue, Apr 10, 2012 at 6:35 PM, Heinrich Apfelmus
|
Yup. It's indeed rather narrow, but I am beginning to learn that sometimes, putting workarounds in the official branch can make life easier. (Had that problem with compilation of reactive-banana on GHC 7.2)
Ok. |
In an effort to make the reactive-banana library compile on UHC, I would like to include a variant of the
vault
package that doesn't use any GHC-specific functions. Of course, the best way to do this is to use the CPP preprocessor.The only trouble is probably the ST monad which UHC likely doesn't have. However, I think that ST can be implemented in terms of
unsafePerformIO
, so it's easy to add it to the UHC libraries.The text was updated successfully, but these errors were encountered: