1
Fork 0

feat: haskell stuff

This commit is contained in:
Matei Adriel 2020-04-18 10:04:12 +03:00
parent cd21c88a5c
commit d6f460d390
6 changed files with 49 additions and 4 deletions
modules/dev/haskell

View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
let hie = pkgs.all-hies.selection { selector = p: { inherit (p) ghc865; }; };
in {
home-manager.users.adrielus.home = {
file.".ghci".source = ./ghci;
# file.".stack/config.yaml".source = ./stack.yaml;
packages = with pkgs;
[ ghc ghcid hlint cabal-install snack stack hie ]
++ (with haskellPackages; [ brittany hoogle hpack pointfree pointful ]);
};
}

10
modules/dev/haskell/ghci Normal file
View file

@ -0,0 +1,10 @@
: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

View file

@ -0,0 +1,5 @@
templates:
params:
author-name: "Matei Adriel"
author-email: "rafaeladriel11@gmail.com"
github-username: "Mateiadrielrafael"