1
haskell/Lib.hs
Normal file
1
haskell/Lib.hs
Normal file
@@ -0,0 +1 @@
|
||||
module Lib where
|
8
haskell/README.org
Normal file
8
haskell/README.org
Normal file
@@ -0,0 +1,8 @@
|
||||
* Compile
|
||||
Just run =ghc p<x>.hs= where <x> is the problem number
|
||||
|
||||
* Run
|
||||
Just run =runhaskell p<x>.hs= where <x> is the problem number
|
||||
|
||||
* Environment
|
||||
If you use nix just run =nix develop= or =nix develop .#withLsp= if you want haskell-language-server.
|
43
haskell/flake.lock
generated
Normal file
43
haskell/flake.lock
generated
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1666610816,
|
||||
"narHash": "sha256-q4F2VNe5bpxXOvp16DyLwE1SgNZMbNO29ZQJPIomedg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6107f97012a0c134c5848125b5aa1b149b76d2c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "release-22.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
31
haskell/flake.nix
Normal file
31
haskell/flake.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
description = "eulerfunt in haskell";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = github:nixos/nixpkgs/release-22.05;
|
||||
utils.url = github:numtide/flake-utils;
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, utils }:
|
||||
utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells = with pkgs; rec {
|
||||
default = mkShell {
|
||||
buildInputs = [ ghc ];
|
||||
};
|
||||
withLsp = mkShell {
|
||||
buildInputs = [
|
||||
ghc
|
||||
haskell-language-server
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user