Beginner Question: Attempting to create copy of GHC

I am trying to setup GHCJS, which is a cross-compiler from Haskell to javascript (link to ghcjs github). I have ensured I have the same version of GHC and GHCJS (this is my stack version of GHC). I have also setup emsdk. I setup the source tree and am now stuck trying to install ghc in the inplace/bin folder. When I run the stack install: stack --system-ghc --skip-ghc-check install --local-bin-dir=inplace/bin, it says “Invalid option `–local-bin-dir=inplace/bin’”. When i run the cabal install: “cabal v1-install --prefix=inplace”, i get “cabal.exe: Error reading local package.
Couldn’t find .cabal file in: .”
Does anyone know how i could fix this?

Search results for 'javascript' - Haskell Community :

…in particular:

If you just want an alternative to working directly with JS, using e.g. PureScript could be a simpler alternative:

2 Likes

From stack help, I think the option you want is --local-bin-path:

  --local-bin-path DIR     Install binaries to DIR

That said… I haven’t setup GHCJS in a long time, but when I ran ops for projects that used GHCJS, setting up and getting the build to work with GHCJS was always hardest part and most time-consuming. So if you really want to use GHCJS, I would recommend taking good notes, trying different things, digging deep into the details available to become an authority for yourself, and don’t give up. If you are open to using other tools, consider your options and try them out.

1 Like

Thanks this makes me love haskell even more!

Thanks, I’ll have a try with that. Really appreciated!