Skip to content

Instantly share code, notes, and snippets.

@sajith
Created January 28, 2018 16:11
Show Gist options
  • Save sajith/0d5cf929ac367d8ac9d50501aaecd9ff to your computer and use it in GitHub Desktop.
Save sajith/0d5cf929ac367d8ac9d50501aaecd9ff to your computer and use it in GitHub Desktop.
:set prompt "λ » "
:def h \x -> return $ ":!hoogle -c -n 15 \"" ++ x ++ "\""
:def hoogle \x -> return $ ":!hoogle -c -n 15 \"" ++ x ++ "\""
:def doc \x -> return $ ":!hoogle --info \"" ++ x ++ "\""
:def hlint \x -> return $ ":!hlint \"" ++ x ++ "\""
:def browser \ u -> return $ ":!firefox " ++ u
:def package \m -> return $ ":!ghc-pkg --simple-output find-module " ++ m
:{
:def browse \m -> return $ if m == ""
then ":browser $(ghc --print-libdir)/../../share/doc/ghc/html/index.html"
else ":browser $(ghc-pkg --simple-output field $(ghc-pkg --simple-output find-module " ++ m ++ ") haddock-html)/$(echo " ++ m ++ " | tr . -).html"
:}
-- :def pf \f -> return $ ":!pointfree \"" ++ f ++ "\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment