Skip to content

alskipp/haskell-katas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haskell Katas

Test

Some random programming problems in Haskell. All code is in the test directory.

This project will hopefully serve as a useful reference to anyone interested in trying out programming problems using Haskell with continuous test feedback.

Nix is recommended to get up and running.

TL;DR

Assuming Nix is installed, run bin/test, all tests will run and will rerun each time a file changes.

Developing Katas and Running tests

To start a new kata, add a new file to the test directory (the file name must end with Spec.hs), also add the file name to the end of haskell-katas.cabal.

Hspec is used for testing, so a spec function will be needed.

Here is a scaffold for a new file:
module WibbleSpec where

import Test.Hspec

spec :: Spec
spec = describe "Testy time" $ do
  it "should work" $ do
    pending

To have unit tests run automatically upon file save with ghcid, run the following in a terminal:

bin/test

On first run, the ghc compiler and project dependencies will be installed into the nix store (subsequent runs will use the binaries in your local nix store).

Installing Nix

Instructions for Linux and macOS

Neuron

About

Haskell katas with minimal Nix setup

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published