-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathghci
49 lines (38 loc) · 1.35 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
-- vim: syn=haskell
:seti -XDataKinds
:seti -XMagicHash
:seti -XNumericUnderscores
:seti -XOverloadedStrings
:seti -XPackageImports
:seti -XQuasiQuotes
:seti -XScopedTypeVariables
:seti -XTypeApplications
:seti -Wno-incomplete-uni-patterns
:seti -Wno-type-defaults
:set -Wno-unused-top-binds
import "base" Data.Foldable
import "base" Data.List
import "base" Data.Maybe
import "base" Data.Monoid
import "base" Text.Show.Functions
:set -package bytestring
import "bytestring" Data.ByteString (ByteString)
import qualified "bytestring" Data.ByteString as B
import qualified "bytestring" Data.ByteString.Lazy as BL
:set -package text
import "text" Data.Text (Text)
import qualified "text" Data.Text as T
import qualified "text" Data.Text.Lazy as TL
import qualified "text" Data.Text.IO as TIO
-- Hoogle commands
:def hoogle \x -> return $ ":!hoogle \"" ++ x ++ "\""
:def doc \x -> return $ ":!hoogle --info \"" ++ x ++ "\""
:def dash \x -> return $ ":!/usr/bin/open \"dash://h:" ++ x ++ "\""
:set prompt "\ESC[1;34m\nλ: \ESC[0m"
:set prompt-cont "\ESC[1;34m | \ESC[0m"
-- Prompt with list of loaded modules
-- :set prompt "\ESC[1;34m\n%s\nλ: \ESC[0m"
-- always show type of result (like :t)
:set +t
-- Shortcut for ":kind!" to expand type families, from https://stackoverflow.com/a/13597174/1889401
:def k! \x -> return (":kind! " ++ x)