-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ghci
29 lines (22 loc) · 1.01 KB
/
.ghci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
:set -XImportQualifiedPost
-- Only needed to define the :def statements in here.
import Prelude ((++), ($), pure)
import Text.Megaparsec qualified as P
import Text.Megaparsec.Char qualified as P
import Text.Megaparsec.Char.Lexer qualified as Lex
:set prompt "aoc> "
:set -ferror-spans -freverse-errors -fprint-expanded-synonyms
:set -fprint-explicit-foralls
:def hoogle \s -> pure $ ":! hoogle --count=15 \"" ++ s ++ "\""
:def pretty \_ -> pure (":set -interactive-print=Text.Pretty.Simple.pPrint")
:def no-pretty \_ -> pure (":set -interactive-print System.IO.print")
:set -interactive-print=Text.Pretty.Simple.pPrint
-- Turn off all warnings in the REPL, mainly to reduce noise at startup.
:set -w
-- Nonsense to get loading/reloading of the local aoc2023 library files to work.
-- After launching GHCi, run `:la` to load `GHCI.hs` which in turn re-exports
-- other modules.
--
-- Run the `repl` script to have this done automatically at startup (requires
-- `expect` to be installed).
:def la \_ -> pure ":load app/GHCI.hs"