An Even Richer Language of Types

Going Beyond ADTs with Dependent Types in Idris

My Qualifications

Idris nØØb

FP lover

Reading the MEAP

Wrote some code

How I Got Here - Untyped FP

How I Got Here - Typed FP

Make Illegal States Unrepresentable!

Dependent Types

Types can be predicted on values

Curry-Howard correspondence

Intuitionist logic

Idris

Experimental/Research language

For general purpose programming

Cross-Platform

Many Backends

Strict (vs Haskell)

Type-Driven Development

Idris as an interactive environment

Holes

Limited type and value inference

Unification

Not everything that can be proven can be unified

Means of reconciling expected and actual types

Totality

%default total

--total
id : a -> a
id x = x

partial
oneTwoOrThree : Int -> String
oneTwoOrThree 1 = "One"
oneTwoOrThree 2 = "Two"
oneTwoOrThree 3 = "Three"

How much info in the type?

All the Things I Don't Know

How it compares to refinement types

Interactive proving

Effects library

Many others

Questions?

...and now, code!

An Even Richer Language Of Types

By Keith Pinson

An Even Richer Language Of Types

Going Beyond ADTs with Dependent Types in Idris

  • 952