hamlet/Parse-struct.ss
(module Parse-struct (planet chongkai/sml)
  (#%module-begin
   (Program:
    (STRDECTopDec:
     (STRUCTUREStrDec:
      (StrBind:
       (StrId: Parse-struct)
       (COLONStrExp:
        (STRUCTStrExp:
         (SEQStrDec:
          (DECStrDec: (TYPEDec: (TypBind: (TyVarseq:) (TyCon: source-type) (CONTy: (Tyseq:) (LongTyCon: Source.source-type)))))
          (SEQStrDec:
           (DECStrDec: (TYPEDec: (TypBind: (TyVarseq:) (TyCon: InfEnv-type) (CONTy: (Tyseq:) (LongTyCon: Infix.InfEnv-type)))))
           (SEQStrDec:
            (DECStrDec: (TYPEDec: (TypBind: (TyVarseq:) (TyCon: Program-type) (CONTy: (Tyseq:) (LongTyCon: GrammarProgram.Program-type)))))
            (SEQStrDec:
             (STRUCTUREStrDec:
              (StrBind:
               (StrId: LrVals-struct)
               (APPStrExp:
                (FunId: LrValsFn-functor)
                (STRUCTStrExp: (STRUCTUREStrDec: (StrBind: (StrId: Token-struct) (IDStrExp: (LongStrId: LrParser.Token-struct))))))))
             (SEQStrDec:
              (STRUCTUREStrDec:
               (StrBind:
                (StrId: Lexer-struct)
                (APPStrExp:
                 (FunId: LexerFn-functor)
                 (STRUCTStrExp: (STRUCTUREStrDec: (StrBind: (StrId: Tokens-struct) (IDStrExp: (LongStrId: LrVals.Tokens-struct))))))))
              (SEQStrDec:
               (STRUCTUREStrDec:
                (StrBind:
                 (StrId: |Lexer'-struct|)
                 (APPStrExp:
                  (FunId: LineAwareLexer-functor)
                  (STRUCTStrExp:
                   (SEQStrDec:
                    (STRUCTUREStrDec: (StrBind: (StrId: Lexer-struct) (IDStrExp: (LongStrId: Lexer-struct))))
                    (DECStrDec: (EXCEPTIONDec: (EQUALExBind: (VId: Error) (LongVId: Source.Error)))))))))
               (SEQStrDec:
                (STRUCTUREStrDec:
                 (StrBind:
                  (StrId: Parser-struct)
                  (APPStrExp:
                   (FunId: Join-functor)
                   (STRUCTStrExp:
                    (SEQStrDec:
                     (STRUCTUREStrDec: (StrBind: (StrId: LrParser-struct) (IDStrExp: (LongStrId: LrParser-struct))))
                     (SEQStrDec:
                      (STRUCTUREStrDec: (StrBind: (StrId: ParserData-struct) (IDStrExp: (LongStrId: LrVals.ParserData-struct))))
                      (STRUCTUREStrDec: (StrBind: (StrId: Lex-struct) (IDStrExp: (LongStrId: |Lexer'-struct|))))))))))
                (DECStrDec:
                 (VALDec:
                  (TyVarseq:)
                  (RECValBind:
                   (PLAINValBind:
                    (ATPat: (IDAtPat: (LongVId: parse)))
                    (FNExp:
                     (Match:
                      (Mrule:
                       (ATPat:
                        (PARAtPat:
                         (ATPat:
                          (RECORDAtPat:
                           (FIELDPatRow:
                            (Lab: |1|)
                            (ATPat: (IDAtPat: (LongVId: J)))
                            (FIELDPatRow:
                             (Lab: |2|)
                             (ATPat: (IDAtPat: (LongVId: source)))
                             (FIELDPatRow: (Lab: |3|) (ATPat: (IDAtPat: (LongVId: filename))))))))))
                       (ATExp:
                        (LETAtExp:
                         (SEQDec:
                          (VALDec:
                           (TyVarseq:)
                           (PLAINValBind:
                            (ATPat: (IDAtPat: (LongVId: yyread)))
                            (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: ref))) (IDAtExp: (LongVId: false)))))))
                          (SEQDec:
                           (VALDec:
                            (TyVarseq:)
                            (RECValBind:
                             (PLAINValBind:
                              (ATPat: (IDAtPat: (LongVId: yyinput)))
                              (FNExp:
                               (Match:
                                (Mrule:
                                 (ATPat: (PARAtPat: (ATPat: (WILDCARDAtPat:))))
                                 (IFExp:
                                  (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: yyread)))))
                                  (ATExp: (SCONAtExp: (STRINGSCon: "")))
                                  (ATExp:
                                   (SEQAtExp:
                                    (ATExp:
                                     (PARAtExp:
                                      (APPExp:
                                       (ATExp: (IDAtExp: (LongVId: :=)))
                                       (RECORDAtExp:
                                        (ExpRow:
                                         (Lab: |1|)
                                         (ATExp: (IDAtExp: (LongVId: yyread)))
                                         (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: true)))))))))
                                    (PARAtExp: (ATExp: (IDAtExp: (LongVId: source)))))))))))))
                           (SEQDec:
                            (VALDec:
                             (TyVarseq:)
                             (PLAINValBind:
                              (ATPat: (IDAtPat: (LongVId: lexer)))
                              (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: Parser.makeLexer))) (IDAtExp: (LongVId: yyinput)))))))
                            (SEQDec:
                             (VALDec:
                              (TyVarseq:)
                              (RECValBind:
                               (PLAINValBind:
                                (ATPat: (IDAtPat: (LongVId: onError)))
                                (FNExp:
                                 (Match:
                                  (Mrule:
                                   (ATPat:
                                    (PARAtPat:
                                     (ATPat:
                                      (RECORDAtPat:
                                       (FIELDPatRow:
                                        (Lab: |1|)
                                        (ATPat: (IDAtPat: (LongVId: s)))
                                        (FIELDPatRow:
                                         (Lab: |2|)
                                         (ATPat: (IDAtPat: (LongVId: left)))
                                         (FIELDPatRow: (Lab: |3|) (ATPat: (IDAtPat: (LongVId: right))))))))))
                                   (ATExp:
                                    (PARAtExp:
                                     (APPExp:
                                      (ATExp: (IDAtExp: (LongVId: Error.error)))
                                      (RECORDAtExp:
                                       (ExpRow:
                                        (Lab: |1|)
                                        (ATExp:
                                         (RECORDAtExp:
                                          (ExpRow:
                                           (Lab: file)
                                           (ATExp: (IDAtExp: (LongVId: filename)))
                                           (ExpRow:
                                            (Lab: region)
                                            (ATExp:
                                             (RECORDAtExp:
                                              (ExpRow:
                                               (Lab: left)
                                               (ATExp: (IDAtExp: (LongVId: left)))
                                               (ExpRow: (Lab: right) (ATExp: (IDAtExp: (LongVId: right)))))))))))
                                        (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: s)))))))))))))))
                             (SEQDec:
                              (VALDec:
                               (TyVarseq:)
                               (RECValBind:
                                (PLAINValBind:
                                 (ATPat: (IDAtPat: (LongVId: I)))
                                 (FNExp:
                                  (Match:
                                   (Mrule:
                                    (ATPat:
                                     (PARAtPat:
                                      (ATPat:
                                       (RECORDAtPat:
                                        (FIELDPatRow:
                                         (Lab: |1|)
                                         (ATPat: (IDAtPat: (LongVId: left)))
                                         (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: right)))))))))
                                    (COLONExp:
                                     (ATExp:
                                      (RECORDAtExp:
                                       (ExpRow:
                                        (Lab: file)
                                        (ATExp: (IDAtExp: (LongVId: filename)))
                                        (ExpRow:
                                         (Lab: region)
                                         (ATExp:
                                          (RECORDAtExp:
                                           (ExpRow:
                                            (Lab: left)
                                            (ATExp: (IDAtExp: (LongVId: left)))
                                            (ExpRow:
                                             (Lab: right)
                                             (IFExp:
                                              (ATExp:
                                               (PARAtExp:
                                                (APPExp:
                                                 (ATExp: (IDAtExp: (LongVId: =)))
                                                 (RECORDAtExp:
                                                  (ExpRow:
                                                   (Lab: |1|)
                                                   (ATExp: (IDAtExp: (LongVId: right)))
                                                   (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: Source.nowherePos)))))))))
                                              (ATExp: (IDAtExp: (LongVId: left)))
                                              (ATExp: (IDAtExp: (LongVId: right))))))))))))
                                     (CONTy: (Tyseq:) (LongTyCon: Source.info-type)))))))))
                              (VALDec:
                               (TyVarseq:)
                               (PLAINValBind:
                                (ATPat:
                                 (RECORDAtPat:
                                  (FIELDPatRow:
                                   (Lab: |1|)
                                   (ATPat:
                                    (RECORDAtPat:
                                     (FIELDPatRow:
                                      (Lab: |1|)
                                      (ATPat: (IDAtPat: (LongVId: program)))
                                      (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: |J'|)))))))
                                   (FIELDPatRow: (Lab: |2|) (ATPat: (WILDCARDAtPat:))))))
                                (HANDLEExp:
                                 (ATExp:
                                  (PARAtExp:
                                   (APPExp:
                                    (ATExp: (IDAtExp: (LongVId: Parser.parse)))
                                    (RECORDAtExp:
                                     (ExpRow:
                                      (Lab: |1|)
                                      (ATExp: (SCONAtExp: (INTSCon: 0)))
                                      (ExpRow:
                                       (Lab: |2|)
                                       (ATExp: (IDAtExp: (LongVId: lexer)))
                                       (ExpRow:
                                        (Lab: |3|)
                                        (ATExp: (IDAtExp: (LongVId: onError)))
                                        (ExpRow:
                                         (Lab: |4|)
                                         (ATExp:
                                          (RECORDAtExp:
                                           (ExpRow:
                                            (Lab: |1|)
                                            (ATExp: (IDAtExp: (LongVId: I)))
                                            (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: J)))))))))))))))
                                 (Match:
                                  (Mrule:
                                   (ATPat:
                                    (PARAtPat:
                                     (CONPat:
                                      (LongVId: |Lexer'.Error|)
                                      (RECORDAtPat:
                                       (FIELDPatRow:
                                        (Lab: |1|)
                                        (ATPat: (IDAtPat: (LongVId: region)))
                                        (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: e)))))))))
                                   (ATExp:
                                    (PARAtExp:
                                     (APPExp:
                                      (ATExp: (IDAtExp: (LongVId: Error.error)))
                                      (RECORDAtExp:
                                       (ExpRow:
                                        (Lab: |1|)
                                        (ATExp:
                                         (RECORDAtExp:
                                          (ExpRow:
                                           (Lab: file)
                                           (ATExp: (IDAtExp: (LongVId: filename)))
                                           (ExpRow: (Lab: region) (ATExp: (IDAtExp: (LongVId: region)))))))
                                        (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: e)))))))))))))))))))
                         (ATExp:
                          (RECORDAtExp:
                           (ExpRow:
                            (Lab: |1|)
                            (ATExp: (IDAtExp: (LongVId: |J'|)))
                            (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: program))))))))))))))))))))))))
        (IDSigExp: (SigId: PARSE-sig))))))
    (Program: (STRDECTopDec: (EMPTYStrDec:))))))