Skip to content

Instantly share code, notes, and snippets.

@cwvh
Last active December 23, 2015 15:39
Show Gist options
  • Save cwvh/6657386 to your computer and use it in GitHub Desktop.
Save cwvh/6657386 to your computer and use it in GitHub Desktop.
Read header comment on how to setup.
{-
Place contents of this file in $HOME/.ghci then run
$ cabal install -j2 hoogle
$ hoogle data
-}
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
:set prompt ">>> "
-- Don't uncomment the following unless you know what you're doing
--
-- :set -XBangPatterns
-- :set -XGADTs
-- :set -XGeneralizedNewtypeDeriving
-- :set -XRecordWildCards
-- :set -XTypeFamilies
-- :set -XTypeOperators
--
-- import Control.Applicative
-- import Control.Monad
-- import Data.Monoid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment