We currently store and deal with errors using a list of strings as lines. This doesn't mix very well with pretty-printing of error messages. It would be nice to use `Doc` instead of this to make the error messages nicer and easier to nest properly.