Hlint told me to do some things.
Remove an unnecessary >>

It was in a do-block and simply could be replaced with a newline.
Split up the `render` do-block

It was written in one line with {} - just use newlines instead.
Realign `closestPoint`

It now fits in 80 characters.
Tidy up `distanceToIntersection`
Add a type declaration to `main`
Turn on -Wall
Add a type declaration to `fileName`
Add type declarations for camera control values

This is `d`, `left`, `right`, `top` and `bottom`.
Rename `length` to `mag`

This avoids shadowing the top-level `length`.
Rename the top-level `fileName`

It's now `outputFileName`. This conveys its usage more clearly and
avoids shadowing issues in `removeIfExists`.
Shorten the width, height declarations