forked from ndmitchell/shake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ghci
58 lines (49 loc) · 1.95 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
54
55
56
57
58
:set -ignore-package=hashmap
:set -fwarn-unused-binds -fwarn-unused-imports -fwarn-orphans
:set -DNETWORK
:set -isrc
:load src/Test.hs src/Paths.hs
:def test \x -> return $ ":main test " ++ x
:def test_random \x -> return $ ":main random test " ++ x
:def docs_ const $ return $ unlines [":!cabal haddock"]
:def docs const $ return $ unlines [":docs_",":!start dist\\doc\\html\\shake\\Development-Shake.html"]
:def hlint_ const $ return ":!hlint src --report=hlint.html"
:def hlint const $ return $ unlines [":hlint_",":!start hlint.html"]
:def travis const $ return ":!ghc -fno-code travis.hs"
:{
let _ghci_make name flags =
":!" ++
"(if not exist .hpc mkdir .hpc) && " ++
"(if not exist .hpc\\" ++ name ++ " mkdir .hpc\\" ++ name ++ ") && " ++
"ghc " ++ flags ++ " -rtsopts -ignore-package hashmap -package transformers --make -isrc src/Test.hs src/Paths.hs -w -odir .hpc/" ++ name ++ " -hidir .hpc/" ++ name ++ " -o .hpc/" ++ name ++ "/shake.exe -main-is Test.main"
:}
:{
:def prof_ \x -> return $ unlines
[_ghci_make "prof" "-rtsopts -threaded -prof -auto-all -caf-all"
,":!.hpc\\prof\\shake +RTS -P -RTS " ++ x
,":!profiterole shake.prof"
]
:}
:def prof \x -> return $ unlines [":prof_ " ++ x,":!start shake.profiterole.html"]
:{
:def hpc_ const $ return $ unlines
[_ghci_make "hpc" "-fhpc"
,":!del shake.tix"
,":!.hpc\\hpc\\shake clean"
,":!.hpc\\hpc\\shake test"
,":!.hpc\\hpc\\shake random test 1m"
,":!hpc.exe markup shake.tix --destdir=.hpc"
,":!hpc.exe report shake.tix"
,":!del shake.tix"]
:}
:def hpc \x -> return $ unlines [":hpc_",":!start .hpc\\hpc_index_fun.html"]
:{
:def benchmark \x -> return $ unlines
[_ghci_make "benchmark" "-O2 -threaded"
,":!ptime .hpc\\benchmark\\shake " ++ x
,"putStrLn \"\""]
:}
:{
:def core \x -> return $ unlines
[_ghci_make "core" "-O1 -threaded -ddump-simpl" ++ " > core.txt"]
:}