Skip to content

A convenient script that generates a fully decked haskell project in a matter of seconds!

License

Notifications You must be signed in to change notification settings

Josemarialanda/simple-haskell-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-haskell-project is a convenient script that sets up a haskell project containing:

  • ghc
  • cabal
  • hoogle
  • ormolu
  • haskell-language-server.

Check out the example projects in example projects.

  • Fast!
  • Simple!
  • Generated code is easy to read and extend!

Usage

Simply run:

source <(curl -s https://raw.githubusercontent.com/Josemarialanda/simple-haskell-project/master/shp.sh) run

Project creation example

This will create a nix flake + cabal based project in the folder a-basic-app.

You can enter the Nix shell with nix develop. From within the shell you can use cabal to enter the repl with cabal repl and you can build your project with cabal build.

You can also build your project with nix instead using nix build.

Note: While the script itself does not depend on cabal or nix to run, in order to build/enter the development shell of your newly created project you do need to have nix + flakes installed.

Install Nix

NixOS - Getting Nix / NixOS

Enable flakes

NixOS

On NixOS set the following options in configuration.nix and run nixos-rebuild.

{ pkgs, ... }: {
  nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

Non-NixOS

On non-nixos systems, edit either ~/.config/nix/nix.conf or /etc/nix/nix.conf and add:

experimental-features = nix-command flakes

Here's a handy copy-paste:

mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf

About

A convenient script that generates a fully decked haskell project in a matter of seconds!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published