Giter VIP home page Giter VIP logo

rhm-io-iter's Introduction

Introduction to Iteratees in Haskell

This is the demo code for a talk about Iteratees held at the Regensburg Haskell Meetup at December 3rd, 2014. It consists of implementations of Iteratees both pure and as monad transformers, along with a small set of examples that demonstrate various features.

You might want to start with looking at the examples in LazyIO which demonstrate two well-known problems with lazy IO in Haskell. After that have a look at the implementation of pure Iteratees in RHM.Intern.Pure as well as the corresponding examples to be found in the RHM.Iteratee and the Main module.

Note that the pure implementation is largely (if not at all) redundant when the transformer variant is used instead (see e.g. StateT and State).

Running the examples

Install the project's dependencies into a cabal sandbox:

cabal sandbox init
cabal install --only-dependencies
cabal build

Quickly browse through the examples in src/LazyIO.hs and run the demo with

cabal run lazyio-demo FILENAME

Replace FILENAME with an existing file (will be opened read-only). Adapt the code to run other examples.

Run the iteratee demo with

cabal run iter-demo

Either adapt the code or (preferably) start a REPL session with cabal repl.

Other resources:

rhm-io-iter's People

Watchers

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