diff --git a/Makefile b/Makefile index 8c2c08482..7707563dd 100644 --- a/Makefile +++ b/Makefile @@ -788,25 +788,27 @@ quickheap-%: hledgerprof samplejournals \ # $(call def-help,repl-web, start a cabal REPL and load the hledger-web package) # (cd hledger-web; cabal repl exe:hledger-web) -ghci: \ - $(call def-help,ghci, start a GHCI REPL and load the hledger-lib and hledger packages) - stack exec $(GHCI) -- $(BUILDFLAGS) hledger/Hledger/Cli/Main.hs - -ghci-dev: \ - $(call def-help,ghci, start a GHCI REPL and load the dev.hs script plus hledger-lib and hledger) - stack exec $(GHCI) -- $(BUILDFLAGS) -fno-warn-unused-imports -fno-warn-unused-binds dev.hs - -ghci-ui: \ - $(call def-help,ghci-ui, start a GHCI REPL and load the hledger-lib, hledger and hledger-ui packages) - stack exec $(GHCI) -- $(BUILDFLAGS) hledger-ui/Hledger/UI/Main.hs - -ghci-web: \ - $(call def-help,ghci-web, start a GHCI REPL and load the hledger-lib, hledger and hledger-web packages) - stack exec $(GHCI) -- $(BUILDFLAGS) hledger-web/app/main.hs - -ghci-api: \ - $(call def-help,ghci-api, start a GHCI REPL and load the hledger-lib, hledger and hledger-api packages) - stack exec $(GHCI) -- $(BUILDFLAGS) hledger-api/hledger-api.hs +# multi-package GHCI prompts +# XXX disabled since broken by file-embed +# ghci: \ +# $(call def-help,ghci, start a GHCI REPL and load the hledger-lib and hledger packages) +# stack exec $(GHCI) -- $(BUILDFLAGS) hledger/Hledger/Cli/Main.hs +# +# ghci-dev: \ +# $(call def-help,ghci, start a GHCI REPL and load the dev.hs script plus hledger-lib and hledger) +# stack exec $(GHCI) -- $(BUILDFLAGS) -fno-warn-unused-imports -fno-warn-unused-binds dev.hs +# +# ghci-ui: \ +# $(call def-help,ghci-ui, start a GHCI REPL and load the hledger-lib, hledger and hledger-ui packages) +# stack exec $(GHCI) -- $(BUILDFLAGS) hledger-ui/Hledger/UI/Main.hs +# +# ghci-web: \ +# $(call def-help,ghci-web, start a GHCI REPL and load the hledger-lib, hledger and hledger-web packages) +# stack exec $(GHCI) -- $(BUILDFLAGS) hledger-web/app/main.hs +# +# ghci-api: \ +# $(call def-help,ghci-api, start a GHCI REPL and load the hledger-lib, hledger and hledger-api packages) +# stack exec $(GHCI) -- $(BUILDFLAGS) hledger-api/hledger-api.hs samplejournals: \ data/sample.journal \ diff --git a/site/developer-guide.md b/site/developer-guide.md index 5f2cf582c..f25a5158a 100644 --- a/site/developer-guide.md +++ b/site/developer-guide.md @@ -563,21 +563,28 @@ $ stack bench Get a GHCI prompt for hledger-lib: ```shell -$ stack ghci hledger-lib +$ cd hledger-lib; stack ghci hledger-lib ``` +Changing into the package directory isn't actually needed, but it +enables a custom .ghci script which sets a more useful short prompt. Get a GHCI prompt for hledger: ```shell -$ stack ghci hledger +$ cd hledger; stack ghci hledger ``` +Get a GHCI prompt for hledger-ui: +```shell +$ cd hledger-ui; stack ghci hledger-ui +``` Get a GHCI prompt for hledger-web: ```shell -$ stack ghci hledger-web +$ cd hledger-web; stack ghci hledger-web ``` hledger-web also needs to find some things in its current directory (like the static/ directory). This normally just works, if not please [send details](https://github.com/simonmichael/hledger/issues/274). +