Skip to content

Instantly share code, notes, and snippets.

@ericrasmussen
ericrasmussen / users.idr
Created May 3, 2014 20:02
Contrived user history example to show off dependent types
module main
{-
I assume you're coming here from
http://chromaticleaves.com/posts/idris-and-dependent-types.html
If not, please take a moment to read it. It's a very important white paper.
Completely serious, too.
Now that we have that out of the way, this gist is a contrived example that
@ericrasmussen
ericrasmussen / formgenerator.py
Created February 9, 2012 00:02
FormGenerator to extend Deform functionality
"""
Simple module to ease form handling with ``Deform``. The provided
``FormGenerator`` class handles repetitive tasks like validation,
xhr requests, and recovering from exceptions thrown by the model.
### Begin example scenario: Adding a new user
from myschemas import UserSchema
from formgenerator import (