hamlet/Source-struct.ss
(module Source-struct (planet chongkai/sml)
  (#%module-begin
   (Program:
    (STRDECTopDec:
     (STRUCTUREStrDec:
      (StrBind:
       (StrId: Source-struct)
       (SEALStrExp:
        (STRUCTStrExp:
         (SEQStrDec:
          (DECStrDec: (TYPEDec: (TypBind: (TyVarseq:) (TyCon: source-type) (CONTy: (Tyseq:) (LongTyCon: string-type)))))
          (SEQStrDec:
           (DECStrDec:
            (TYPEDec:
             (TypBind:
              (TyVarseq:)
              (TyCon: pos-type)
              (RECORDTy:
               (TyRow:
                (Lab: abs)
                (CONTy: (Tyseq:) (LongTyCon: int-type))
                (TyRow: (Lab: lin) (CONTy: (Tyseq:) (LongTyCon: int-type)) (TyRow: (Lab: col) (CONTy: (Tyseq:) (LongTyCon: int-type)))))))))
           (SEQStrDec:
            (DECStrDec:
             (TYPEDec:
              (TypBind:
               (TyVarseq:)
               (TyCon: region-type)
               (RECORDTy: (TyRow: (Lab: left) (CONTy: (Tyseq:) (LongTyCon: pos-type)) (TyRow: (Lab: right) (CONTy: (Tyseq:) (LongTyCon: pos-type))))))))
            (SEQStrDec:
             (DECStrDec:
              (TYPEDec:
               (TypBind:
                (TyVarseq:)
                (TyCon: info-type)
                (RECORDTy:
                 (TyRow:
                  (Lab: file)
                  (CONTy: (Tyseq: (CONTy: (Tyseq:) (LongTyCon: string-type))) (LongTyCon: option-type))
                  (TyRow: (Lab: region) (CONTy: (Tyseq:) (LongTyCon: region-type))))))))
             (SEQStrDec:
              (DECStrDec:
               (EXCEPTIONDec:
                (NEWExBind:
                 (VId: Error)
                 (RECORDTy:
                  (TyRow:
                   (Lab: |1|)
                   (PARTy:
                    (RECORDTy: (TyRow: (Lab: |1|) (CONTy: (Tyseq:) (LongTyCon: int-type)) (TyRow: (Lab: |2|) (CONTy: (Tyseq:) (LongTyCon: int-type))))))
                   (TyRow: (Lab: |2|) (CONTy: (Tyseq:) (LongTyCon: string-type))))))))
              (SEQStrDec:
               (DECStrDec:
                (VALDec:
                 (TyVarseq:)
                 (PLAINValBind:
                  (ATPat: (IDAtPat: (LongVId: nowherePos)))
                  (ATExp:
                   (RECORDAtExp:
                    (ExpRow:
                     (Lab: abs)
                     (ATExp: (SCONAtExp: (INTSCon: 0)))
                     (ExpRow: (Lab: lin) (ATExp: (SCONAtExp: (INTSCon: 0))) (ExpRow: (Lab: col) (ATExp: (SCONAtExp: (INTSCon: 0)))))))))))
               (SEQStrDec:
                (DECStrDec:
                 (VALDec:
                  (TyVarseq:)
                  (PLAINValBind:
                   (ATPat: (IDAtPat: (LongVId: nowhere)))
                   (ATExp:
                    (RECORDAtExp:
                     (ExpRow:
                      (Lab: file)
                      (ATExp: (IDAtExp: (LongVId: NONE)))
                      (ExpRow:
                       (Lab: region)
                       (ATExp:
                        (RECORDAtExp:
                         (ExpRow:
                          (Lab: left)
                          (ATExp: (IDAtExp: (LongVId: nowherePos)))
                          (ExpRow: (Lab: right) (ATExp: (IDAtExp: (LongVId: nowherePos))))))))))))))
                (SEQStrDec:
                 (DECStrDec:
                  (VALDec:
                   (TyVarseq:)
                   (RECValBind:
                    (PLAINValBind:
                     (ATPat: (IDAtPat: (LongVId: |over'|)))
                     (FNExp:
                      (Match:
                       (Mrule:
                        (ATPat:
                         (PARAtPat:
                          (ATPat:
                           (RECORDAtPat:
                            (FIELDPatRow:
                             (Lab: |1|)
                             (COLONPat: (ATPat: (IDAtPat: (LongVId: r1))) (CONTy: (Tyseq:) (LongTyCon: region-type)))
                             (FIELDPatRow: (Lab: |2|) (COLONPat: (ATPat: (IDAtPat: (LongVId: r2))) (CONTy: (Tyseq:) (LongTyCon: region-type)))))))))
                        (ATExp:
                         (RECORDAtExp:
                          (ExpRow:
                           (Lab: left)
                           (ATExp:
                            (PARAtExp:
                             (APPExp:
                              (ATExp:
                               (PARAtExp:
                                (FNExp:
                                 (Match:
                                  (Mrule:
                                   (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: left) (ATPat: (IDAtPat: (LongVId: _id96))) (DOTSPatRow:))))
                                   (ATExp: (IDAtExp: (LongVId: _id96))))))))
                              (IDAtExp: (LongVId: r1)))))
                           (ExpRow:
                            (Lab: right)
                            (ATExp:
                             (PARAtExp:
                              (APPExp:
                               (ATExp:
                                (PARAtExp:
                                 (FNExp:
                                  (Match:
                                   (Mrule:
                                    (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: right) (ATPat: (IDAtPat: (LongVId: _id97))) (DOTSPatRow:))))
                                    (ATExp: (IDAtExp: (LongVId: _id97))))))))
                               (IDAtExp: (LongVId: r2))))))))))))))))
                 (SEQStrDec:
                  (DECStrDec:
                   (VALDec:
                    (TyVarseq:)
                    (RECValBind:
                     (PLAINValBind:
                      (ATPat: (IDAtPat: (LongVId: |between'|)))
                      (FNExp:
                       (Match:
                        (Mrule:
                         (ATPat:
                          (PARAtPat:
                           (ATPat:
                            (RECORDAtPat:
                             (FIELDPatRow:
                              (Lab: |1|)
                              (COLONPat: (ATPat: (IDAtPat: (LongVId: r1))) (CONTy: (Tyseq:) (LongTyCon: region-type)))
                              (FIELDPatRow: (Lab: |2|) (COLONPat: (ATPat: (IDAtPat: (LongVId: r2))) (CONTy: (Tyseq:) (LongTyCon: region-type)))))))))
                         (ATExp:
                          (RECORDAtExp:
                           (ExpRow:
                            (Lab: left)
                            (ATExp:
                             (PARAtExp:
                              (APPExp:
                               (ATExp:
                                (PARAtExp:
                                 (FNExp:
                                  (Match:
                                   (Mrule:
                                    (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: right) (ATPat: (IDAtPat: (LongVId: _id98))) (DOTSPatRow:))))
                                    (ATExp: (IDAtExp: (LongVId: _id98))))))))
                               (IDAtExp: (LongVId: r1)))))
                            (ExpRow:
                             (Lab: right)
                             (ATExp:
                              (PARAtExp:
                               (APPExp:
                                (ATExp:
                                 (PARAtExp:
                                  (FNExp:
                                   (Match:
                                    (Mrule:
                                     (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: left) (ATPat: (IDAtPat: (LongVId: _id99))) (DOTSPatRow:))))
                                     (ATExp: (IDAtExp: (LongVId: _id99))))))))
                                (IDAtExp: (LongVId: r2))))))))))))))))
                  (SEQStrDec:
                   (DECStrDec:
                    (VALDec:
                     (TyVarseq:)
                     (RECValBind:
                      (PLAINValBind:
                       (ATPat: (IDAtPat: (LongVId: transform)))
                       (FNExp:
                        (Match:
                         (Mrule:
                          (ATPat: (IDAtPat: (LongVId: f)))
                          (FNExp:
                           (Match:
                            (Mrule:
                             (ATPat:
                              (RECORDAtPat:
                               (FIELDPatRow:
                                (Lab: |1|)
                                (COLONPat: (ATPat: (IDAtPat: (LongVId: i1))) (CONTy: (Tyseq:) (LongTyCon: info-type)))
                                (FIELDPatRow: (Lab: |2|) (COLONPat: (ATPat: (IDAtPat: (LongVId: i2))) (CONTy: (Tyseq:) (LongTyCon: info-type)))))))
                             (ATExp:
                              (RECORDAtExp:
                               (ExpRow:
                                (Lab: file)
                                (ATExp:
                                 (PARAtExp:
                                  (APPExp:
                                   (ATExp:
                                    (PARAtExp:
                                     (FNExp:
                                      (Match:
                                       (Mrule:
                                        (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: file) (ATPat: (IDAtPat: (LongVId: _id100))) (DOTSPatRow:))))
                                        (ATExp: (IDAtExp: (LongVId: _id100))))))))
                                   (IDAtExp: (LongVId: i1)))))
                                (ExpRow:
                                 (Lab: region)
                                 (ATExp:
                                  (PARAtExp:
                                   (APPExp:
                                    (ATExp: (IDAtExp: (LongVId: f)))
                                    (RECORDAtExp:
                                     (ExpRow:
                                      (Lab: |1|)
                                      (ATExp:
                                       (PARAtExp:
                                        (APPExp:
                                         (ATExp:
                                          (PARAtExp:
                                           (FNExp:
                                            (Match:
                                             (Mrule:
                                              (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: region) (ATPat: (IDAtPat: (LongVId: _id101))) (DOTSPatRow:))))
                                              (ATExp: (IDAtExp: (LongVId: _id101))))))))
                                         (IDAtExp: (LongVId: i1)))))
                                      (ExpRow:
                                       (Lab: |2|)
                                       (ATExp:
                                        (PARAtExp:
                                         (APPExp:
                                          (ATExp:
                                           (PARAtExp:
                                            (FNExp:
                                             (Match:
                                              (Mrule:
                                               (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: region) (ATPat: (IDAtPat: (LongVId: _id102))) (DOTSPatRow:))))
                                               (ATExp: (IDAtExp: (LongVId: _id102))))))))
                                          (IDAtExp: (LongVId: i2)))))))))))))))))))))))))
                   (SEQStrDec:
                    (DECStrDec:
                     (VALDec:
                      (TyVarseq:)
                      (PLAINValBind:
                       (ATPat: (IDAtPat: (LongVId: over)))
                       (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: transform))) (IDAtExp: (LongVId: |over'|))))))))
                    (SEQStrDec:
                     (DECStrDec:
                      (VALDec:
                       (TyVarseq:)
                       (PLAINValBind:
                        (ATPat: (IDAtPat: (LongVId: between)))
                        (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: transform))) (IDAtExp: (LongVId: |between'|))))))))
                     (SEQStrDec:
                      (DECStrDec:
                       (VALDec:
                        (TyVarseq:)
                        (RECValBind:
                         (PLAINValBind:
                          (ATPat: (IDAtPat: (LongVId: comparePos)))
                          (FNExp:
                           (Match:
                            (Mrule:
                             (ATPat:
                              (PARAtPat:
                               (ATPat:
                                (RECORDAtPat:
                                 (FIELDPatRow:
                                  (Lab: |1|)
                                  (COLONPat:
                                   (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: abs) (ATPat: (IDAtPat: (LongVId: pos1))) (DOTSPatRow:))))
                                   (CONTy: (Tyseq:) (LongTyCon: pos-type)))
                                  (FIELDPatRow:
                                   (Lab: |2|)
                                   (COLONPat:
                                    (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: abs) (ATPat: (IDAtPat: (LongVId: pos2))) (DOTSPatRow:))))
                                    (CONTy: (Tyseq:) (LongTyCon: pos-type)))))))))
                             (ATExp:
                              (PARAtExp:
                               (APPExp:
                                (ATExp: (IDAtExp: (LongVId: Int.compare)))
                                (RECORDAtExp:
                                 (ExpRow: (Lab: |1|) (ATExp: (IDAtExp: (LongVId: pos1))) (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: pos2))))))))))))))))
                      (SEQStrDec:
                       (DECStrDec:
                        (VALDec:
                         (TyVarseq:)
                         (RECValBind:
                          (PLAINValBind:
                           (ATPat: (IDAtPat: (LongVId: compareRegion)))
                           (FNExp:
                            (Match:
                             (Mrule:
                              (ATPat:
                               (PARAtPat:
                                (ATPat:
                                 (RECORDAtPat:
                                  (FIELDPatRow:
                                   (Lab: |1|)
                                   (COLONPat: (ATPat: (IDAtPat: (LongVId: r1))) (CONTy: (Tyseq:) (LongTyCon: region-type)))
                                   (FIELDPatRow: (Lab: |2|) (COLONPat: (ATPat: (IDAtPat: (LongVId: r2))) (CONTy: (Tyseq:) (LongTyCon: region-type)))))))))
                              (APPExp:
                               (ATExp:
                                (PARAtExp:
                                 (FNExp:
                                  (Match:
                                   (Mrule:
                                    (ATPat: (IDAtPat: (LongVId: EQUAL)))
                                    (ATExp:
                                     (PARAtExp:
                                      (APPExp:
                                       (ATExp: (IDAtExp: (LongVId: comparePos)))
                                       (RECORDAtExp:
                                        (ExpRow:
                                         (Lab: |1|)
                                         (ATExp:
                                          (PARAtExp:
                                           (APPExp:
                                            (ATExp:
                                             (PARAtExp:
                                              (FNExp:
                                               (Match:
                                                (Mrule:
                                                 (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: right) (ATPat: (IDAtPat: (LongVId: _id105))) (DOTSPatRow:))))
                                                 (ATExp: (IDAtExp: (LongVId: _id105))))))))
                                            (IDAtExp: (LongVId: r1)))))
                                         (ExpRow:
                                          (Lab: |2|)
                                          (ATExp:
                                           (PARAtExp:
                                            (APPExp:
                                             (ATExp:
                                              (PARAtExp:
                                               (FNExp:
                                                (Match:
                                                 (Mrule:
                                                  (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: right) (ATPat: (IDAtPat: (LongVId: _id106))) (DOTSPatRow:))))
                                                  (ATExp: (IDAtExp: (LongVId: _id106))))))))
                                             (IDAtExp: (LongVId: r2))))))))))))
                                   (Match: (Mrule: (ATPat: (IDAtPat: (LongVId: order))) (ATExp: (IDAtExp: (LongVId: order)))))))))
                               (PARAtExp:
                                (ATExp:
                                 (PARAtExp:
                                  (APPExp:
                                   (ATExp: (IDAtExp: (LongVId: comparePos)))
                                   (RECORDAtExp:
                                    (ExpRow:
                                     (Lab: |1|)
                                     (ATExp:
                                      (PARAtExp:
                                       (APPExp:
                                        (ATExp:
                                         (PARAtExp:
                                          (FNExp:
                                           (Match:
                                            (Mrule:
                                             (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: left) (ATPat: (IDAtPat: (LongVId: _id103))) (DOTSPatRow:))))
                                             (ATExp: (IDAtExp: (LongVId: _id103))))))))
                                        (IDAtExp: (LongVId: r1)))))
                                     (ExpRow:
                                      (Lab: |2|)
                                      (ATExp:
                                       (PARAtExp:
                                        (APPExp:
                                         (ATExp:
                                          (PARAtExp:
                                           (FNExp:
                                            (Match:
                                             (Mrule:
                                              (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: left) (ATPat: (IDAtPat: (LongVId: _id104))) (DOTSPatRow:))))
                                              (ATExp: (IDAtExp: (LongVId: _id104))))))))
                                         (IDAtExp: (LongVId: r2))))))))))))))))))))
                       (DECStrDec:
                        (VALDec:
                         (TyVarseq:)
                         (RECValBind:
                          (PLAINValBind:
                           (ATPat: (IDAtPat: (LongVId: compare)))
                           (FNExp:
                            (Match:
                             (Mrule:
                              (ATPat:
                               (PARAtPat:
                                (ATPat:
                                 (RECORDAtPat:
                                  (FIELDPatRow:
                                   (Lab: |1|)
                                   (COLONPat: (ATPat: (IDAtPat: (LongVId: i1))) (CONTy: (Tyseq:) (LongTyCon: info-type)))
                                   (FIELDPatRow: (Lab: |2|) (COLONPat: (ATPat: (IDAtPat: (LongVId: i2))) (CONTy: (Tyseq:) (LongTyCon: info-type)))))))))
                              (ATExp:
                               (PARAtExp:
                                (APPExp:
                                 (ATExp: (IDAtExp: (LongVId: compareRegion)))
                                 (RECORDAtExp:
                                  (ExpRow:
                                   (Lab: |1|)
                                   (ATExp:
                                    (PARAtExp:
                                     (APPExp:
                                      (ATExp:
                                       (PARAtExp:
                                        (FNExp:
                                         (Match:
                                          (Mrule:
                                           (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: region) (ATPat: (IDAtPat: (LongVId: _id107))) (DOTSPatRow:))))
                                           (ATExp: (IDAtExp: (LongVId: _id107))))))))
                                      (IDAtExp: (LongVId: i1)))))
                                   (ExpRow:
                                    (Lab: |2|)
                                    (ATExp:
                                     (PARAtExp:
                                      (APPExp:
                                       (ATExp:
                                        (PARAtExp:
                                         (FNExp:
                                          (Match:
                                           (Mrule:
                                            (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: region) (ATPat: (IDAtPat: (LongVId: _id108))) (DOTSPatRow:))))
                                            (ATExp: (IDAtExp: (LongVId: _id108))))))))
                                       (IDAtExp: (LongVId: i2)))))))))))))))))))))))))))))))))
        (IDSigExp: (SigId: SOURCE-sig)))))))))