mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
Merge pull request #199 from github/simpler-ghci-configuration
Simplify ghci config using :def!
This commit is contained in:
commit
daa018d0a9
16
.ghci
16
.ghci
@ -2,16 +2,9 @@
|
|||||||
:set -package pretty-show -package hscolour
|
:set -package pretty-show -package hscolour
|
||||||
|
|
||||||
-- See docs/💡ProTip!.md
|
-- See docs/💡ProTip!.md
|
||||||
:undef pretty
|
:def! pretty \ _ -> return ":set -interactive-print Semantic.Util.Pretty.prettyShow"
|
||||||
:def pretty \ _ -> return ":set -interactive-print Semantic.Util.Pretty.prettyShow"
|
:def! no-pretty \_ -> return ":set -interactive-print System.IO.print"
|
||||||
|
:def! r \_ -> return (unlines [":reload", ":pretty"])
|
||||||
-- See docs/💡ProTip!.md
|
|
||||||
:undef no-pretty
|
|
||||||
:def no-pretty \_ -> return ":set -interactive-print System.IO.print"
|
|
||||||
|
|
||||||
-- See docs/💡ProTip!.md
|
|
||||||
:undef r
|
|
||||||
:def r \_ -> return (unlines [":reload", ":pretty"])
|
|
||||||
|
|
||||||
-- See docs/💡ProTip!.md for documentation & examples.
|
-- See docs/💡ProTip!.md for documentation & examples.
|
||||||
:{
|
:{
|
||||||
@ -29,8 +22,7 @@ assignmentExample lang = case lang of
|
|||||||
_ -> mk "" ""
|
_ -> mk "" ""
|
||||||
where mk fileExtension parser = putStrLn ("example: fmap (() <$) . runTask . parse " ++ parser ++ "Parser =<< Semantic.Util.blob \"example." ++ fileExtension ++ "\"") >> return ("import Parsing.Parser\nimport Semantic.Task\nimport Semantic.Util")
|
where mk fileExtension parser = putStrLn ("example: fmap (() <$) . runTask . parse " ++ parser ++ "Parser =<< Semantic.Util.blob \"example." ++ fileExtension ++ "\"") >> return ("import Parsing.Parser\nimport Semantic.Task\nimport Semantic.Util")
|
||||||
:}
|
:}
|
||||||
:undef assignment
|
:def! assignment assignmentExample
|
||||||
:def assignment assignmentExample
|
|
||||||
|
|
||||||
-- Enable breaking on errors for code written in the repl.
|
-- Enable breaking on errors for code written in the repl.
|
||||||
:seti -fbreak-on-error
|
:seti -fbreak-on-error
|
||||||
|
Loading…
Reference in New Issue
Block a user