Bucharest FP

A functional programming group for those living and working in Bucharest

We gather monthly, watch someone talk about something they're passionate about and then continue the discussion in a pub

#003: Types in Haskell; QuickCheck

This meetup took place at the Eloquentix office, Wednesday, 27 August 2014 at 19:00. Find out when our next meetup is.

Enforcing Static Invariants Using Haskell's Type Checker

Lucian Mogoșanu

Biography

Teaching assistant and PhD student at University Politehnica of Bucharest; Researcher at VirtualMetrix. Main interest is applying formal and language-based methods to verify and prove software systems security.

Abstract

Haskell is a statically-typed functional programming language: Haskell type declarations are identified and checked during compilation, guaranteeing that program semantics are known by the designers before execution or possibly even before the implementation.

Additionally, Haskell is strongly-typed, meaning that only explicit type conversions are permitted and all program behaviours are defined according to the type specification. We intend to explore the features of Haskell's type system, using a set of examples as a guide. We also want to use the examples to observe its limitations and examine workarounds to help us write correct programs.

Slides in HTML format can be found here.

QuickCheck: First Dive

Dan Șerban

Biography

Dan used to work in enterprise software. Nowadays he is preoccupied with Haskell and with all the ways in which it can be made into a practically useful tool for the software industry.

Abstract

Testing individual functions for their natural properties is one of the basic building blocks that guides development of large systems in Haskell.

QuickCheck encourages a high level approach to testing where the developer specifies abstract invariants that the algorithms under test should satisfy universally, for any input data one might throw at the code. The actual test data is automatically generated on behalf of the developer by the testing library. In this way the system under test can be hammered with millions of tests that would otherwise be infeasible to write by hand, often uncovering subtle corner cases that would never have been found through unit testing.

QuickCheck was created in 1999, and the underlying idea has since been implemented to greater or lesser extents and in various shapes in different programming languages.