Git Product home page Git Product logo

haskell-codeworld-template's Introduction

Haskell project template with CodeWorld

Hello world demo.

This is a template project using codeworld-api package, ready to be used with either Cabal or Stack. The project also contains hspec (with automatic discovery of specification files) and doctest test suites.

Prerequisites

This project can be build with Cabal and GHC 8.10.7 or with Stack tool. We recommend that you use ghcup to install these.

There is IDE support for Cabal and Haskell through Haskell Language Server, in particular, there seems to be strong support for Haskell development in Visual Studio Code. However, note that many of Haskell developers use Vim or Emacs with separate REPL (e.g. via cabal v2-repl) and ghcid.

How to use

Using Cabal

To build and run a project (without tests), use

cabal v2-run --disable-tests

from the project directory. This will download all the necessary dependencies, compile the project and start CodeWorld canvas server at http://localhost:3000

To simply build the project, run

cabal v2-build

To run tests:

cabal v2-test

Freezing dependencies

When you add/change dependencies of the project it is a good idea to freeze the used versions, to ensure the project will be successfully built on another machine at another time. To freeze dependencies, run

cabal v2-freeze

Using Stack

To build and run a project (without tests), use

stack run

from the project directory. This will download all the necessary dependencies, compile the project and start CodeWorld canvas server at http://localhost:3000

To simply build the project, run

stack build

To run tests:

stack test

With Visual Studio Code

One way to use VS Code is to open a browser tab, pointing to http://localhost:3000.

Sample VS Code setup.

haskell-codeworld-template's People

Contributors

fizruk avatar iammaxim avatar sl1depengwyn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.