All Projects → ucsd-progsys → liquidhaskell-tutorial

ucsd-progsys / liquidhaskell-tutorial

Licence: MIT License
Tutorial for LiquidHaskell

Programming Languages

TeX
3793 projects
haskell
3896 projects

LiquidHaskell Tutorial

TODO: UPDATE the website with the new code

NOTE The PDF/HTML are sometimes not up-to-date with the latest LiquidHaskell release. Please clone the github repository and run locally for best results.

How to Do The Tutorial

LH is available as a GHC plugin from version 0.8.10.

Thus, the best way to do this tutorial is to

Step 1 Clone this repository,

$ git clone --recursive https://github.com/ucsd-progsys/liquidhaskell-tutorial.git

Step 2: Iteratively edit-compile until it builds without any liquid type errors

$ cabal v2-build

or

$ stack build --fast --file-watch

The above workflow will let you use whatever Haskell tooling you use for your favorite editor, to automatically display LH errors as well.

Contents

Part I: Refinement Types

  1. Introduction
  2. Logic & SMT
  3. Refinement Types
  4. Polymorphism
  5. Refined Datatypes

Part II: Measures

  1. Boolean Measures
  2. Numeric Measures
  3. Set Measures

Part III : Case Studies

  1. Case Study: Okasaki's Lazy Queues
  2. Case Study: Associative Maps
  3. Case Study: Pointers & Bytes
  4. Case Study: AVL Trees

Update

$ git pull origin master
$ git submodule update --recursive

Building

Deploy on Github

Step 1

Do we really need to install pandoc-citeproc?

$ mv package.yaml.pandoc package.yaml
$ stack install pandoc template
$ make html
$ make pdf
$ make upload 
Prerequisites
$ cd ../ && git clone https://github.com/ucsd-progsys/liquid-client.git

Dependencies

$ stack install pandoc pandoc-citeproc template

Prerequisites

  • Install LaTeX dependencies:
    • Texlive
    • texlive-latex-extra
    • texlive-fonts-extra

Producing .pdf Book

$ make pdf
$ evince dist/pbook.pdf

Solutions to Exercises

Solutions are in separate private repo

TODO

A work list of TODO items can be found in the bug tracker

Feedback and Gotchas

Editing feedback and various gotchas can be found in feedback.md

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].