Skip to content

Instantly share code, notes, and snippets.

@chemist
Created May 27, 2013 13:39
Show Gist options
  • Save chemist/5657103 to your computer and use it in GitHub Desktop.
Save chemist/5657103 to your computer and use it in GitHub Desktop.
ghci config for search and doc
:set prompt " >>> "
let ghciEscapeShellArg arg = "'" ++ concatMap (\x -> if x == '\'' then "'\"'\"'" else [x]) arg ++ "'"
:def! search return . (":! hoogle --color --count=20 " ++) . ghciEscapeShellArg
:def! doc return . (":! hoogle --info " ++) . ghciEscapeShellArg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment