All Projects → srid → haskell-template

srid / haskell-template

Licence: MIT license
Haskell project template using Nix + Flakes + VSCode (HLS)

Programming Languages

Nix
1067 projects
haskell
3896 projects
shell
77523 projects

Projects that are alternatives of or similar to haskell-template

idris2-pkgs
An unofficial Idris2 package repository for Nix
Stars: ✭ 32 (-52.94%)
Mutual labels:  nix
supernova
🌌 Apache Pulsar client for Haskell
Stars: ✭ 35 (-48.53%)
Mutual labels:  nix
deadnix
Scan Nix files for dead code
Stars: ✭ 121 (+77.94%)
Mutual labels:  nix
dotfiles
My dotfiles for Bash/Zsh, Vim/Neovim, Doom Emacs, tmux, Git, terminal emulators, JupyterLab, aria2, mpv, Nix and Homebrew
Stars: ✭ 149 (+119.12%)
Mutual labels:  nix
nix-rice
A library to functionally define your configuration and theme (rice) with Nix
Stars: ✭ 43 (-36.76%)
Mutual labels:  nix
nixos-tutorial
one hour, hands-on
Stars: ✭ 118 (+73.53%)
Mutual labels:  nix
easy-dhall-nix
Derivations for easily downloading Dhall binaries and putting them to use.
Stars: ✭ 22 (-67.65%)
Mutual labels:  nix
homeage
runtime decrypted age secrets for nix home manager
Stars: ✭ 43 (-36.76%)
Mutual labels:  nix
flake-nimble
Nimble packages Nix flake [maintainer=@ehmry]
Stars: ✭ 26 (-61.76%)
Mutual labels:  nix
nix-npm-buildpackage
Build nix packages that use npm/yarn
Stars: ✭ 48 (-29.41%)
Mutual labels:  nix
nixdots
I have no idea what the hell I'm doing
Stars: ✭ 46 (-32.35%)
Mutual labels:  nix
dotfiles
dotfiles repository
Stars: ✭ 15 (-77.94%)
Mutual labels:  nix
easy-hls-nix
Easy Haskell Language Server tooling with Nix!
Stars: ✭ 56 (-17.65%)
Mutual labels:  nix
denxi
Denxi is a programming model for distributing data. It reduces the cost of producing package managers, storefronts, operating systems, and CI/CD systems.
Stars: ✭ 65 (-4.41%)
Mutual labels:  nix
triton
Triton Operating System
Stars: ✭ 56 (-17.65%)
Mutual labels:  nix
dotfiles
🏠
Stars: ✭ 53 (-22.06%)
Mutual labels:  nix
emacs
Nightly custom Emacs builds for macOS Nix environments
Stars: ✭ 25 (-63.24%)
Mutual labels:  nix
nyx
⚙️Nix[OS] Configuration
Stars: ✭ 50 (-26.47%)
Mutual labels:  nix
nix-bisect
Bisect nix builds. Status: alpha/proof of concept. You'll probably have to dig into the implementation if you want to use it. Built for personal use, lightly maintained. PRs welcome. Issues welcome, but I make no promises regarding responses or fix
Stars: ✭ 72 (+5.88%)
Mutual labels:  nix
osu.nix
DEPRECATED osu! on Nix
Stars: ✭ 13 (-80.88%)
Mutual labels:  nix

haskell-template

Haskell project template optimized for a fully reproducible and friendly development environment. Based on:

Getting Started

First-time setup:

  • Install Nix (>= 2.8) & enable Flakes
  • Run nix develop -c haskell-language-server to sanity check your environment
  • Open as single-folder workspace in Visual Studio Code
    • When prompted by VSCode, install the workspace recommended extensions
    • Ctrl+Shift+P to run command "Nix-Env: Select Environment" and then select shell.nix.
      • The extension will ask you to reload VSCode at the end. Do it.

To run the program with auto-recompile:

  • Press Ctrl+Shift+B in VSCode, or run bin/run in terminal, to launch Ghcid running your program.

Open Main.hs, and expect all HLS IDE features like hover-over tooltip to work out of the box. Try changing the source, and expect Ghcid to re-compile and re-run the app in the terminal below.


Renaming the project:

# First, click the green "Use this template" button on GitHub to create your copy.
git clone <your-clone-url>
cd your-project
NAME=myproject

git mv haskell-template.cabal ${NAME}.cabal
nix run nixpkgs#sd -- haskell-template ${NAME} * */*
git add . && git commit -m rename

Tips

  • Run nix flake update to update all flake inputs.
  • Run treefmt in nix shell to autoformat the project. This uses treefmt, which uses ./treefmt.toml (where fourmolu and nixpkgs-fmt are specified).
  • Run bin/hoogle to start Hoogle with packages in your cabal file.
  • Run the application without installing: nix run github:srid/haskell-template (or nix run . from checkout)

Alternatives

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].