1
Fork 0
satellite/modules/dev/haskell/ghci

10 lines
907 B
Plaintext
Raw Normal View History

2020-04-18 09:04:12 +02:00
:def paste \_ -> do { paste <- System.Process.readProcess "pbpaste" [] ""; let cmd = if '\n' `elem` paste then ":{\ntype Ö = ()\n" ++ paste ++ "\n:}" else paste in putStrLn ("\SOH\ESC[33m\STX" ++ paste ++ "\SOH\ESC[0m\STX") >> return (":cmd return " ++ show cmd) }
:def paste-quiet \_ -> do { paste <- System.Process.readProcess "pbpaste" [] ""; let cmd = if '\n' `elem` paste then ":{\ntype Ö = ()\n" ++ paste ++ "\n:}" else paste in return (":cmd return " ++ show cmd) }
:def hoogle \str -> return $ ":! hoogle search --color --count=10 " ++ show str
:def hoogle-all \str -> return $ ":! hoogle search --color " ++ show str
:def doc \str -> return $ ":! hoogle search --color --info " ++ show str
:def pointfree \str -> return $ ":! pointfree " ++ show str
:def pf \str -> return $ ":! pointfree " ++ show str
:def pointful \str -> return $ ":! pointful " ++ show str