Skip to content

Commit

Permalink
Run :l Main automatically when opening ghci
Browse files Browse the repository at this point in the history
Fixes #1506

This mirror the expected behaviour when running e.g. `import Web.Types` (this fails without a `:l Main` first)
  • Loading branch information
mpscholten committed Sep 3, 2022
1 parent b7f856d commit 083a32f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion exe/IHP/IDE/DevServer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ startAppGHCI = do
[ ":script " <> cs libDirectory <> "/applicationGhciConfig"
, ":set prompt \"\"" -- Disable the prompt as this caused output such as '[38;5;208mIHP>[m Ser[v3e8r; 5s;t2a0r8tmedI' instead of 'Server started'
, "import qualified ClassyPrelude"
, ":l Main.hs"
]

async $ forever $ ByteString.hGetLine outputHandle >>= \line -> do
Expand Down
4 changes: 3 additions & 1 deletion lib/IHP/applicationGhciConfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@
:set -XDeepSubsumption
:set -XOverloadedRecordDot
:set -Werror=missing-fields
:set -fwarn-incomplete-patterns
:set -fwarn-incomplete-patterns
:set -package ghc
:l Main.hs

0 comments on commit 083a32f

Please sign in to comment.