Beloch.ParseSource-to-AST parsing, shared by Beloch and Session.
Lives as its own leaf module (depends only on Lexer/Parser/ Sedlexing/Error) so that Session can call it without creating a cycle through the top-level Beloch module, which re-exports every other module in the library.
val parse : filename:string -> string -> Ast.programval library :
filename:string ->
string ->
(string * Error.span) option * Ast.shape_def listA library file, which holds shapes and no `paper` line, such as the standard library: the unit it declares, and the shapes a program sees as defined before its own first line. The annotations at its head are checked as those of a program without statements and then dropped.