-
Notifications
You must be signed in to change notification settings - Fork 137
/
.ghci
43 lines (41 loc) · 1.78 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
:set -Wunused-binds -Wunused-imports -Worphans
:set -isrc
:set -hide-package=ghc-lib-parser
:load Main src/Paths.hs
:def test \xs -> return $ ":main test " ++ xs
:{
:def opt \xs -> return $ unlines
[":!mkdir dist\\obj\\o2"
,":!ghc -O2 -fno-state-hack -hide-package=ghc-lib-parser -isrc --make src/Paths.hs Main -threaded -outputdir dist/obj/o2 -o dist/obj/o2/main -rtsopts cbits/text_search.o"
,":!dist\\obj\\o2\\main +RTS -T -N2 -RTS " ++ xs]
:}
:{
:def opt1 \xs -> return $ unlines
[":!mkdir dist\\obj\\o1"
,":!ghc -O1 -fno-state-hack -isrc --make src/Paths.hs Main -threaded -outputdir dist/obj/o1 -o dist/obj/o1/main -rtsopts cbits/text_search.o"
,":!dist\\obj\\o1\\main +RTS -T -N2 -RTS " ++ xs]
:}
:{
:def opt0 \xs -> return $ unlines
[":!mkdir dist\\obj\\o0"
,":!ghc -O0 -fno-state-hack -isrc --make src/Paths.hs Main -threaded -outputdir dist/obj/o0 -o dist/obj/o0/main -rtsopts cbits/text_search.o"
,":!dist\\obj\\o0\\main +RTS -T -N2 -RTS " ++ xs]
:}
:{
:def time_ \xs -> return $ unlines
[":!mkdir dist\\obj\\prof"
,":!ghc -prof -rtsopts -fprof-auto -fprof-cafs -O2 -fno-state-hack -isrc -DPROFILE --make src/Paths.hs Main -outputdir dist/obj/prof -o dist/obj/prof/main cbits/text_search.o"
,":!dist\\obj\\prof\\main +RTS -P -T -RTS " ++ xs]
:}
:{
:def time \xs -> return $ unlines
[":time_ " ++ xs
,":!start main.prof"]
:}
:{
:def space \xs -> return $ unlines
[":!mkdir dist\\obj\\prof"
,":!ghc -fno-state-hack -prof -rtsopts -fprof-auto -fprof-cafs -isrc -DPROFILE --make src/Paths.hs Main -outputdir dist/obj/prof -o dist/obj/prof/main cbits/text_search.o && " ++
"dist\\obj\\prof\\main +RTS -xt -L1000 -h -T -RTS " ++ xs ++ " && " ++
"hp2pretty main.hp"]
:}