-
Notifications
You must be signed in to change notification settings - Fork 163
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
GHCJS typechecker plugins #626
Comments
Also a clue as to whether GHCJS plugins are supported is ghcjs/ghcjs@e36e50a, where I can see 'something' that touches plugins. I'd assume that the thing to do is to compile the plugins with GHC and pass them through to GHCJS via |
Hi @zarybnicky. I'm also trying to get polysemy-plugin to work with GHCJS, did you discover anything more about this? |
@locallycompact No progress to report, no. I did discover that IOHK used to use GHC plugins with GHCJS, but it wasn't a straightforward process and I instead postponed the reflex+polysemy project indefinitely... 🤷♂️ Nowadays, I'd say eff, or one of the effect system alternatives that don't require a plugin would be cleaner - but the ghc-typelits-* plugins are still something desirable. |
Polysemy doesn't require the plugin to work, it just saves on type applications, but thanks for trying this and reporting! |
I'm trying to use plugins in my Reflex experiments. While I dimly recall reading somewhere that GHCJS doesn't support plugins, that might've been a long time ago as I can't find that information again anywhere, and from reading the Nix files, I got the impression that
Reflex.Optimizer
is usable when compiling with GHCJS as well.In particular I'm having trouble compiling
ghc-tcplugins-extra
due to itsghc
dependency - I did manage to discoverghc-api-ghcjs
by thorough Googling, but patchingghc-tcplugins-extra
to look forghc-api-ghcjs
instead ofghc
doesn't help (Encountered missing dependencies: ghc-api-ghcjs -any
).It seems to me that
ghc-api-ghcjs
is getting compiled with GHC 8.6.4 - the full path to the .so is/nix/store/2cx3p3ywpzz47f23zw3i1ssdjfddjjjw-ghc-api-ghcjs-8.6.5/lib/ghc-8.6.4/x86_64-linux-ghc-8.6.4/libHSghc-api-ghcjs-8.6.5-F0KeWR7UxRl4rynnmWSnQM-ghc8.6.4.so
(note the twoghc-8.6.4
), but I can't find where this is coming from. I'd assume it's theghcjs-ng
machinery inside nixpkgs, but that is as far as I got...I did see that using Reflex.Optimizer with GHCJS adds an extra
ghcLibdir
(ghcLibdir = "${self.ghc.bootPackages.ghcWithPackages (p: [ p.reflex ])}/lib/${self.ghc.bootPackages.ghc.name}";
), but I didn't manage to make it work for other plugins.My ultimate goal is to get
ghc-typelits-knownnat
,ghc-typelits-normalize
, andpolysemy-plugin
working in GHCJS, but that seems a long way off right now...The text was updated successfully, but these errors were encountered: