de Bruijn indexing + typer

Ok here's mine. I don't write much Haskell so I'd be happy to get feedback.