From 26e1a028dc2dbab9a33e35d67b1743d764f4b175 Mon Sep 17 00:00:00 2001 From: Veit Heller Date: Thu, 12 Jun 2014 13:25:06 +0200 Subject: [PATCH] Added ghci --- README.md | 2 +- bash_profile | 2 +- ghci | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 ghci diff --git a/README.md b/README.md index 7f2cb94..09929f7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ .dotfiles ========= -The dotfiles I use +The dotfiles I use. Includes configuration files for vim, bash, ghci and git. diff --git a/bash_profile b/bash_profile index 4d19dde..92dddaa 100644 --- a/bash_profile +++ b/bash_profile @@ -1,4 +1,4 @@ -export PATH=$PATH:/opt/local/bin:/usr/local/lib/io +export PATH=$PATH:/opt/local/bin:/usr/local/lib/io:~/.cabal/bin export MANPATH=$MANPATH:/opt/local/share/man export INFOPATH=$INFOPATH:/opt/local/share/info alias gcc="gcc-mp-4.9" diff --git a/ghci b/ghci new file mode 100644 index 0000000..7cfefe1 --- /dev/null +++ b/ghci @@ -0,0 +1,5 @@ +:set prompt "ghci> " +let ghciEscapeShellArg arg = "'" ++ concatMap (\c -> if c == '\'' then "'\"'\"'" else [c]) arg ++ "'" + +:def! h return . (":! hoogle --color --count=20 " ++) . ghciEscapeShellArg +:def! doc return . (":! hoogle --info " ++) . ghciEscapeShellArg