:{ :}



let cmdHpc _ = return $ unlines [":!ghc --make -isrc -i. src/Main.hs -w -fhpc -odir .hpc -hidir .hpc -threaded -o .hpc/hlint-test",":!del hlint-test.tix",":!.hpc\\hlint-test --help",":!.hpc\\hlint-test --test",":!.hpc\\hlint-test src --report=.hpc\\hlint-test-report.html +RTS -N3",":!.hpc\\hlint-test data --report=.hpc\\hlint-test-report.html +RTS -N3",":!hpc.exe markup hlint-test.tix --destdir=.hpc",":!hpc.exe report hlint-test.tix",":!del hlint-test.tix",":!start .hpc\\hpc_index_fun.html"]

:def hpc cmdHpc





:{

:def hpc const $ return $ unlines

[":!ghc --make -isrc -i. src/Main.hs -w -fhpc -odir .hpc -hidir .hpc -threaded -o .hpc/hlint-test"

,":!del hlint-test.tix"

,":!.hpc\\hlint-test --help"

,":!.hpc\\hlint-test --test"

,":!.hpc\\hlint-test src --report=.hpc\\hlint-test-report.html +RTS -N3"

,":!.hpc\\hlint-test data --report=.hpc\\hlint-test-report.html +RTS -N3"

,":!hpc.exe markup hlint-test.tix --destdir=.hpc"

,":!hpc.exe report hlint-test.tix"

,":!del hlint-test.tix"

,":!start .hpc\\hpc_index_fun.html"]

:}



:{ :}

:def

A few days ago I posted about my plan to use .ghci files for all my projects. I am now doing so in at least five projects, and it's working great. There were two disadvantages: 1) every command had to be squeezed on to a single line; 2) some names were introduced into the global namespace. Thanks to a hint from doliorules , aboutI can eliminate these disadvantages.Let's take the previous example from HLint's .ghci file:It work's, but it's ugly. However, it can be rewritten as:Thenotation allows multi-line input in GHCi. GHCi also allows full expressions after a. Combined, we now have a much more readable .ghci file.