-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add a "haskell_repl" executable #220
Comments
you could make a repl target an optional output of all rules. e.g.
|
@johnynek's idea sounds very good to me. |
I worked on this today: https://github.com/tweag/rules_haskell/compare/auto-repl-per-target. @johnynek's idea worked quite well, we define optional repl output automatically for every binary and library target and so it's not built till explicitly requested. Not opening PR yet because this needs:
I'll finish this up on Wednessday. |
Currently, in order to use a REPL, we need to write explicit
haskell_repl
rules. Compare that to the UX of stack or cabal, where you can writestack repl some-package
,stack repl some-package:exe:some-binary
, etc., and automatically load a session with all the source files and dependencies for a particular target.An alternate approach would be for
rules_haskell
to provide a single, generic script that takes a Bazel target (or targets) as a command-line argument, for example:One approach would be to write a version of
haskell_repl
which is an aspect, and then make the above script callbazel build //some/haskell:target --aspects ...
to generate the script that the explicit rule produces today.Another approach would be to use an OutputGroup for each
haskell_library
/haskell_binary
, which contains source files and compilation info (similar to what we pass through the existing providers (HaskellBuildInfo
,HaskellLibraryInfo
).The text was updated successfully, but these errors were encountered: