-
Notifications
You must be signed in to change notification settings - Fork 1
/
.ghci
53 lines (40 loc) · 1.41 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
-- Common extensions to load (for interactive input only, not loaded modules)
-- Syntax Extensions
:seti -XPackageImports
:seti -XTupleSections
:seti -XNumDecimals
:seti -XUnicodeSyntax
:seti -XBinaryLiterals
:seti -XPatternGuards
:seti -XViewPatterns
:seti -XTypeOperators
:seti -XLambdaCase
:seti -XQuasiQuotes
-- Type Extensions
:seti -XExistentialQuantification
:seti -XOverloadedStrings
:seti -XRankNTypes
:seti -XScopedTypeVariables
-- Common modules to Load
import "base" Data.List -- List operations
import "base" Data.Monoid -- Monoid operations
import "base" Control.Monad -- Monad operations
import "base" Data.Ratio -- Ratio and Rational operations
import "base" Text.Show.Functions -- Function showing
-- GHCi Settings
:set editor "vim"
-- Using 256 colours
:set prompt "\ESC[38;5;150m»»\ESC[m \ESC[38;5;100m\ESC[1m%s\ESC[0m\n ☯ "
:set prompt-cont " | "
-- Macros
-- Show Language, Extensions, Flags and Imports
:def statusi (\_ -> return ":seti\n:show imports\n:show modules")
-- Pretty prints a showable expression or binding
:def pp (\s -> return $ ":cmd return $ \":! echo '\" ++ show " ++ s ++ " ++ \"' | ppsh\"")
-- Pretty prints a string expression or binding
:def pps (\s -> return $ ":cmd return $ \":! echo '\" ++ " ++ s ++ " ++ \"' | ppsh\"")
-- Timing and Type Output and Multiline Input
-- These must be last to prevent noise
:set +t
:set +s
:set +m