Giter VIP home page Giter VIP logo

tagless-final's Introduction

tagless-final

stack ghc iHaskell jupyter license

Implement attempts for typed tagless-final interpreters

References

  1. Typed Tagless-Final Interpretations: Introductory Course
  2. Kiselyov, Oleg. "Typed tagless final interpreters." Generic and Indexed Programming. Springer, Berlin, Heidelberg, 2012. 130-174.
  3. CodeWars: Finally tagless interpreter

Build

Install some dependencies:

$ sudo apt-get install libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libmagic-dev libblas-dev liblapack-dev

Create a new conda environment named tagless and activate it:

$ conda create -n tagless python=3.7
$ conda activate tagless

Install Jupyter notebook and its extensions:

$ pip install notebook
$ pip install jupyter_contrib_nbextensions
$ pip install jupytext

Install IHaskell using stack(if you haven't installed stack yet, try curl -sSL https://get.haskellstack.org/ | sh and do not install any new ghc after installing stack):

$ git clone https://github.com/gibiansky/IHaskell
$ cd IHaskell
$ pip install -r requirements.txt
$ stack install --allow-different-user --fast
$ ihaskell install --stack

Clone this repository and enter:

$ git clone https://github.com/li-xin-yi/tagless-final
$ cd tagless-final

Start a Jupyter notebook server:

$ stack exec jupyter -- notebook --config=config.py

Open http://localhost:3040/ with your favorite browser and try to run all codes!

If your stack, Jupyter and IHaskell are installed in a remote server (like what I do): on the server, you can run

$ screen -S tagless

Start a subscreen named tagless, and run all command above on this subscreen, then exit by Ctrl + A + D to make the Jupyter server run in background. You can recover the screen by:

$ screen -r tagless

At any time.

Now, you can access the notebook from your local machine by

$ ssh -N -f -L localhost:3040:localhost:3040 <username>@<server-name>

and open http://localhost:3040/.

tagless-final's People

Contributors

li-xin-yi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.