Parse a PIR program. The resulting program will have fresh names. The
underlying monad must be capable of handling any parse errors. This passes
"test" to the parser as the name of the input stream; to supply a name
explicity, use `parse program nameinput`.
The data type SourcePos represents source positions. It contains the
name of the source file, a line number, and a column number. Source line
and column positions change intensively during parsing, so we need to
make them strict to avoid memory leaks.