-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ghci
44 lines (38 loc) · 1.59 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
-- Show loaded modules in window title and use a green "λ>" as prompt.
-- Subsequent lines of multi-line commands shall begin with " |".
:set prompt "\SOH\ESC]0;GHCi: %s\BEL\ESC[32;1m\STXλ>\SOH\ESC[0m\STX "
:set prompt2 "\SOH\ESC[32;1m\STX |\SOH\ESC[0m\STX "
-- Hoogle (cabal install hoogle && hoogle data)
:def hoogle \str -> return $ ":! hoogle search --color --count=10 " ++ show str
:def hoogle-all \str -> return $ ":! hoogle search --color " ++ show str
:def doc \str -> return $ ":! hoogle search --color --info " ++ show str
-- Pointfree and Pointful (cabal install pointfree pointful)
:def pointfree \str -> return $ ":! pointfree " ++ show str
:def pf \str -> return $ ":! pointfree " ++ show str
:def pointful \str -> return $ ":! pointful " ++ show str
import Control.Applicative
import Control.Monad
import Data.ByteString (ByteString)
import Data.Map (Map)
import Data.List
import Data.Set (Set)
import Data.Text (Text)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as B8
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Vector as V
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Mutable as M
import qualified Data.Vector.Unboxed.Mutable as MU
import Data.Word
:def x \_ -> return ":set -XOverloadedStrings -XOverloadedLists"
let li = [1..4] :: [Int]
let vli = V.fromList li
let uli = U.fromList li
mli <- V.thaw vli
umli <- U.thaw uli
:set +c