Giter Site home page Giter Site logo

argumatronic / applicatives Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 0.0 717 KB

slides and code from applicative workshop

License: GNU General Public License v3.0

Makefile 0.28% Haskell 99.72%
monad functor argument-parsing haskell applicative optparse-applicative

applicatives's Introduction

Slides and examples from Applicative workshop LambdaConf Winter Retreat, January 2017

Talk Outline:

Monad!

  • context dependency: earlier failures can short-circuit later code
  • maybe.hs
  • either.hs for comparison (this was mostly added after the talk, for the Austin meetup)

Applicative

  • another type of functor, different from Functor or Monad
  • anagramMaybe.hs
  • compare monadic and applicative versions

AccValidation

  • datatype from validation library
  • anagramEither.hs
  • like Either but can accumulate error messages on the left
  • acc project

ApplicativeDo

  • new language extension lets you use do syntax with applicatives
  • see applicDo.hs within acc project

We didn't talk much about parsing but probably should have

optparse-applicative

  • library for command line argument parsing
  • most of it is implemented applicatively (not monadically, though monadic parsing is also fun)
  • we didn't talk about how most of the functions and types this library provides works
  • walked through example optex project

using optparse in a project

  • command line address book along the lines of ppl addressbook
  • this is just the argument parsing portion
  • address project

applicatives's People

Contributors

argumatronic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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