You have me puzzled! You can totally ignore/skip cabal and just use
- to create project dir with stack.yaml
stack new myproject simple
- to ensure all dependencies and a ghc for that stack.yaml are present stack setup
- to rebuild any changes stack make
- to live-code in your project stack repl
- to run interpreted any one of your mains: stack runghc some/tool.hs
- to grab 3rd-party dependencies for the project: stack install some-external-lib
Pretty similar to most other modern languages' "canonical" build/run/package-management tooling really.> Ideally, I'd be able to write Haskell that compiles into concise, trimmed down, readable javascript bundles, (as you can compile OCaml with bucklescript). But I don't think it's really possible right now. Once upon a time I successfully managed to get ghcjs to compile code using a library I was interested in. It spit out a 1 MB bundle, without even doing much of anything.
Well. For JavaScript from Haskell, other than GHCJS that "compiles the whole runtime system" to multi-MB packages, there's more lightweight options (outside of PureScript/Elm), namely: Fay and Haste. Fear not, a new from-scratch transpiler is also next on my agenda however! ;) that's because Fay parses Haskell to transpile, but I definitely want to transpile from the highly optimized and richly annotated-with-compilation-hints "STG" IR. Not sure how Haste does it, but I'd rather have full control over the JS I emit over the coming half-decade anyway and it's certainly a bit dated (ES 6+ can be emitted so much more "compactly" than legacy JS!)
That being said, from what you're saying I think you're better served with ReasonML or PureScript as these projects seem to already have matured somewhat yet also not-yet-stale =)