feat: haskell stuff
This commit is contained in:
parent
cd21c88a5c
commit
d6f460d390
|
@ -1 +1,3 @@
|
|||
{ ... }: { imports = [ ./nix.nix ./purescript.nix ./javascript.nix ]; }
|
||||
{ ... }: {
|
||||
imports = [ ./nix.nix ./purescript.nix ./javascript.nix ./haskell ];
|
||||
}
|
||||
|
|
12
modules/dev/haskell/default.nix
Normal file
12
modules/dev/haskell/default.nix
Normal 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
10
modules/dev/haskell/ghci
Normal 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
|
5
modules/dev/haskell/stack.yaml
Normal file
5
modules/dev/haskell/stack.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
templates:
|
||||
params:
|
||||
author-name: "Matei Adriel"
|
||||
author-email: "rafaeladriel11@gmail.com"
|
||||
github-username: "Mateiadrielrafael"
|
|
@ -9,13 +9,17 @@ in {
|
|||
inherit imports;
|
||||
inherit unstable;
|
||||
|
||||
inherit (import imports.niv { }) niv;
|
||||
|
||||
cached-nix-shell = callPackage imports.cached-nix-shell { };
|
||||
easy-purescript-nix = callPackage imports.easy-purescript-nix { };
|
||||
|
||||
brave = unstable.brave;
|
||||
all-hies = import imports.all-hies { };
|
||||
snack = (import imports.snack).snack-exe;
|
||||
|
||||
inherit (import imports.niv { }) niv;
|
||||
inherit (import imports.all-hies { }) all-hies;
|
||||
# unstable stuff
|
||||
brave = unstable.brave;
|
||||
ghc = unstable.ghc;
|
||||
})
|
||||
];
|
||||
|
||||
|
|
|
@ -106,5 +106,17 @@
|
|||
"type": "tarball",
|
||||
"url": "https://github.com/nixos/nixpkgs-channels/archive/9b0d2f3fd153167b0c8ce84bb71e766a39ed4c9d.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"snack": {
|
||||
"branch": "master",
|
||||
"description": "Nix-based incremental build tool for Haskell projects",
|
||||
"homepage": "",
|
||||
"owner": "nmattia",
|
||||
"repo": "snack",
|
||||
"rev": "b638463b9a7490867b44d0c33bb02e8f7ca82f29",
|
||||
"sha256": "02h4f0nrjvhsm7hvmrnc4kfi5my48d7yvind0f1kq1lsrcch6iph",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nmattia/snack/archive/b638463b9a7490867b44d0c33bb02e8f7ca82f29.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue