project template
This commit is contained in:
commit
ded26c4df5
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
.direnv
|
||||
dist-newstyle/
|
||||
result
|
4
app/Main.hs
Normal file
4
app/Main.hs
Normal file
|
@ -0,0 +1,4 @@
|
|||
module Main where
|
||||
|
||||
main :: IO ()
|
||||
main = putTextLn "mjau"
|
58
flake.lock
Normal file
58
flake.lock
Normal file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1717144377,
|
||||
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
|
||||
"path": "/nix/store/i1aw9jjgxcvyd642s12kw3iasmarwd42-source",
|
||||
"rev": "805a384895c696f802a9bf5bf4720f37385df547",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
23
flake.nix
Normal file
23
flake.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
description = "A bare minimum Haskell flake";
|
||||
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (sys:
|
||||
let pkgs = import nixpkgs { system = sys; };
|
||||
hpkgs = pkgs.haskell.packages.ghc965;
|
||||
project = (hpkgs.callCabal2nix "gecco" ./. {}).overrideAttrs (old: old // {
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.llvm_15 ];
|
||||
});
|
||||
in {
|
||||
packages.default = project;
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [ hpkgs.cabal-install ];
|
||||
inputsFrom = [ project.env ];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
36
gecco.cabal
Normal file
36
gecco.cabal
Normal file
|
@ -0,0 +1,36 @@
|
|||
cabal-version: 3.0
|
||||
name: gecco
|
||||
version: 0.1.0
|
||||
synopsis: simple programming language to play with codegen
|
||||
license: ISC
|
||||
author: rachel samuelsson
|
||||
maintainer: depsterr@protonmail.com
|
||||
category: Language
|
||||
build-type: Simple
|
||||
|
||||
executable gecco
|
||||
main-is: Main.hs
|
||||
|
||||
build-depends: base
|
||||
, relude
|
||||
, gecco
|
||||
mixins: base hiding (Prelude)
|
||||
, relude (Relude as Prelude)
|
||||
, relude
|
||||
hs-source-dirs: app
|
||||
default-language: GHC2021
|
||||
default-extensions: OverloadedStrings
|
||||
ghc-options: -O2 -fexpose-all-unfoldings -fspecialize-aggressively -fllvm -threaded "-with-rtsopts=-A32M -N8"
|
||||
|
||||
|
||||
library
|
||||
exposed-modules: Core
|
||||
build-depends: base
|
||||
, relude
|
||||
mixins: base hiding (Prelude)
|
||||
, relude (Relude as Prelude)
|
||||
, relude
|
||||
hs-source-dirs: src
|
||||
default-language: GHC2021
|
||||
default-extensions: OverloadedStrings
|
||||
ghc-options: -O2 -fexpose-all-unfoldings -fspecialize-aggressively -fllvm -threaded
|
4
src/Core.hs
Normal file
4
src/Core.hs
Normal file
|
@ -0,0 +1,4 @@
|
|||
module Core where
|
||||
|
||||
test :: String
|
||||
test = "mjau"
|
Loading…
Reference in New Issue
Block a user