lib/Bool-struct.ss
(module Bool-struct (planet chongkai/sml)
  (#%module-begin
   (Program:
    (STRDECTopDec:
     (STRUCTUREStrDec:
      (StrBind:
       (StrId: Bool-struct)
       (STRUCTStrExp:
        (SEQStrDec:
         (SEQStrDec:
          (SEQStrDec:
           (DECStrDec: (VALDec: (TyVarseq:) (PLAINValBind: (ATPat: (IDAtPat: (LongVId: not))) (ATExp: (IDAtExp: (LongVId: not))))))
           (SEQStrDec:
            (SEQStrDec: (EMPTYStrDec:) (EMPTYStrDec:))
            (DECStrDec:
             (VALDec:
              (TyVarseq:)
              (RECValBind:
               (PLAINValBind:
                (ATPat: (IDAtPat: (LongVId: toString)))
                (FNExp:
                 (Match:
                  (Mrule:
                   (ATPat: (IDAtPat: (LongVId: _id10542)))
                   (APPExp:
                    (ATExp:
                     (PARAtExp:
                      (FNExp:
                       (Match:
                        (Mrule: (ATPat: (PARAtPat: (ATPat: (IDAtPat: (LongVId: false))))) (ATExp: (SCONAtExp: (STRINGSCon: "false"))))
                        (Match: (Mrule: (ATPat: (PARAtPat: (ATPat: (IDAtPat: (LongVId: true))))) (ATExp: (SCONAtExp: (STRINGSCon: "true")))))))))
                    (PARAtExp: (ATExp: (PARAtExp: (ATExp: (IDAtExp: (LongVId: _id10542))))))))))))))))
          (SEQStrDec:
           (SEQStrDec: (EMPTYStrDec:) (EMPTYStrDec:))
           (SEQStrDec:
            (DECStrDec:
             (VALDec:
              (TyVarseq:)
              (RECValBind:
               (PLAINValBind:
                (ATPat: (IDAtPat: (LongVId: getstring)))
                (FNExp:
                 (Match:
                  (Mrule:
                   (ATPat: (IDAtPat: (LongVId: _id10546)))
                   (FNExp:
                    (Match:
                     (Mrule:
                      (ATPat: (IDAtPat: (LongVId: _id10547)))
                      (FNExp:
                       (Match:
                        (Mrule:
                         (ATPat: (IDAtPat: (LongVId: _id10548)))
                         (APPExp:
                          (ATExp:
                           (PARAtExp:
                            (FNExp:
                             (Match:
                              (Mrule:
                               (ATPat:
                                (RECORDAtPat:
                                 (FIELDPatRow:
                                  (Lab: |1|)
                                  (ATPat: (IDAtPat: (LongVId: str)))
                                  (FIELDPatRow:
                                   (Lab: |2|)
                                   (ATPat: (IDAtPat: (LongVId: getc)))
                                   (FIELDPatRow: (Lab: |3|) (ATPat: (IDAtPat: (LongVId: source))))))))
                               (ATExp:
                                (LETAtExp:
                                 (SEQDec:
                                  (SEQDec:
                                   (VALDec:
                                    (TyVarseq:)
                                    (PLAINValBind:
                                     (ATPat: (IDAtPat: (LongVId: len)))
                                     (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: size))) (IDAtExp: (LongVId: str)))))))
                                   (VALDec:
                                    (TyVarseq:)
                                    (RECValBind:
                                     (PLAINValBind:
                                      (ATPat: (IDAtPat: (LongVId: toLower)))
                                      (FNExp:
                                       (Match:
                                        (Mrule:
                                         (ATPat: (IDAtPat: (LongVId: _id10543)))
                                         (APPExp:
                                          (ATExp:
                                           (PARAtExp:
                                            (FNExp:
                                             (Match:
                                              (Mrule:
                                               (ATPat: (PARAtPat: (ATPat: (IDAtPat: (LongVId: c)))))
                                               (APPExp:
                                                (ATExp:
                                                 (PARAtExp:
                                                  (FNExp:
                                                   (Match:
                                                    (Mrule:
                                                     (ATPat: (IDAtPat: (LongVId: true)))
                                                     (ATExp:
                                                      (PARAtExp:
                                                       (APPExp:
                                                        (ATExp: (IDAtExp: (LongVId: Char.chr)))
                                                        (PARAtExp:
                                                         (ATExp:
                                                          (PARAtExp:
                                                           (APPExp:
                                                            (ATExp: (IDAtExp: (LongVId: +)))
                                                            (RECORDAtExp:
                                                             (ExpRow:
                                                              (Lab: |1|)
                                                              (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: Char.ord))) (IDAtExp: (LongVId: c)))))
                                                              (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (INTSCon: 32))))))))))))))
                                                    (Match: (Mrule: (ATPat: (IDAtPat: (LongVId: false))) (ATExp: (IDAtExp: (LongVId: c)))))))))
                                                (PARAtExp:
                                                 (APPExp:
                                                  (ATExp:
                                                   (PARAtExp:
                                                    (FNExp:
                                                     (Match:
                                                      (Mrule:
                                                       (ATPat: (IDAtPat: (LongVId: true)))
                                                       (ATExp:
                                                        (PARAtExp:
                                                         (APPExp:
                                                          (ATExp: (IDAtExp: (LongVId: <=)))
                                                          (RECORDAtExp:
                                                           (ExpRow:
                                                            (Lab: |1|)
                                                            (ATExp: (IDAtExp: (LongVId: c)))
                                                            (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (CHARSCon: #\Z))))))))))
                                                      (Match: (Mrule: (ATPat: (IDAtPat: (LongVId: false))) (ATExp: (IDAtExp: (LongVId: false)))))))))
                                                  (PARAtExp:
                                                   (ATExp:
                                                    (PARAtExp:
                                                     (APPExp:
                                                      (ATExp: (IDAtExp: (LongVId: <=)))
                                                      (RECORDAtExp:
                                                       (ExpRow:
                                                        (Lab: |1|)
                                                        (ATExp: (SCONAtExp: (CHARSCon: #\A)))
                                                        (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: c))))))))))))))))))
                                          (PARAtExp: (ATExp: (PARAtExp: (ATExp: (IDAtExp: (LongVId: _id10543))))))))))))))
                                  (SEQDec:
                                   (SEQDec: (EMPTYDec:) (EMPTYDec:))
                                   (VALDec:
                                    (TyVarseq:)
                                    (RECValBind:
                                     (PLAINValBind:
                                      (ATPat: (IDAtPat: (LongVId: h)))
                                      (FNExp:
                                       (Match:
                                        (Mrule:
                                         (ATPat: (IDAtPat: (LongVId: _id10544)))
                                         (FNExp:
                                          (Match:
                                           (Mrule:
                                            (ATPat: (IDAtPat: (LongVId: _id10545)))
                                            (APPExp:
                                             (ATExp:
                                              (PARAtExp:
                                               (FNExp:
                                                (Match:
                                                 (Mrule:
                                                  (ATPat:
                                                   (RECORDAtPat:
                                                    (FIELDPatRow:
                                                     (Lab: |1|)
                                                     (ATPat: (IDAtPat: (LongVId: i)))
                                                     (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: src)))))))
                                                  (APPExp:
                                                   (ATExp:
                                                    (PARAtExp:
                                                     (FNExp:
                                                      (Match:
                                                       (Mrule:
                                                        (ATPat: (IDAtPat: (LongVId: true)))
                                                        (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: SOME))) (IDAtExp: (LongVId: src))))))
                                                       (Match:
                                                        (Mrule:
                                                         (ATPat: (IDAtPat: (LongVId: false)))
                                                         (APPExp:
                                                          (ATExp:
                                                           (PARAtExp:
                                                            (FNExp:
                                                             (Match:
                                                              (Mrule: (ATPat: (IDAtPat: (LongVId: NONE))) (ATExp: (IDAtExp: (LongVId: NONE))))
                                                              (Match:
                                                               (Mrule:
                                                                (ATPat:
                                                                 (PARAtPat:
                                                                  (CONPat:
                                                                   (LongVId: SOME)
                                                                   (RECORDAtPat:
                                                                    (FIELDPatRow:
                                                                     (Lab: |1|)
                                                                     (ATPat: (IDAtPat: (LongVId: c)))
                                                                     (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: rest)))))))))
                                                                (APPExp:
                                                                 (ATExp:
                                                                  (PARAtExp:
                                                                   (FNExp:
                                                                    (Match:
                                                                     (Mrule:
                                                                      (ATPat: (IDAtPat: (LongVId: true)))
                                                                      (ATExp:
                                                                       (PARAtExp:
                                                                        (APPExp:
                                                                         (ATExp:
                                                                          (PARAtExp:
                                                                           (APPExp:
                                                                            (ATExp: (IDAtExp: (LongVId: h)))
                                                                            (PARAtExp:
                                                                             (ATExp:
                                                                              (PARAtExp:
                                                                               (APPExp:
                                                                                (ATExp: (IDAtExp: (LongVId: +)))
                                                                                (RECORDAtExp:
                                                                                 (ExpRow:
                                                                                  (Lab: |1|)
                                                                                  (ATExp: (IDAtExp: (LongVId: i)))
                                                                                  (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (INTSCon: 1)))))))))))))
                                                                         (IDAtExp: (LongVId: rest))))))
                                                                     (Match:
                                                                      (Mrule: (ATPat: (IDAtPat: (LongVId: false))) (ATExp: (IDAtExp: (LongVId: NONE)))))))))
                                                                 (PARAtExp:
                                                                  (ATExp:
                                                                   (PARAtExp:
                                                                    (APPExp:
                                                                     (ATExp: (IDAtExp: (LongVId: =)))
                                                                     (RECORDAtExp:
                                                                      (ExpRow:
                                                                       (Lab: |1|)
                                                                       (ATExp:
                                                                        (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: toLower))) (IDAtExp: (LongVId: c)))))
                                                                       (ExpRow:
                                                                        (Lab: |2|)
                                                                        (ATExp:
                                                                         (PARAtExp:
                                                                          (APPExp:
                                                                           (ATExp:
                                                                            (PARAtExp:
                                                                             (APPExp:
                                                                              (ATExp: (IDAtExp: (LongVId: stringprimitive.sub_)))
                                                                              (IDAtExp: (LongVId: str)))))
                                                                           (IDAtExp: (LongVId: i)))))))))))))))))))
                                                          (PARAtExp:
                                                           (ATExp:
                                                            (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: getc))) (IDAtExp: (LongVId: src)))))))))))))
                                                   (PARAtExp:
                                                    (ATExp:
                                                     (PARAtExp:
                                                      (APPExp:
                                                       (ATExp: (IDAtExp: (LongVId: >=)))
                                                       (RECORDAtExp:
                                                        (ExpRow:
                                                         (Lab: |1|)
                                                         (ATExp: (IDAtExp: (LongVId: i)))
                                                         (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: len))))))))))))))))
                                             (PARAtExp:
                                              (ATExp:
                                               (RECORDAtExp:
                                                (ExpRow:
                                                 (Lab: |1|)
                                                 (ATExp: (IDAtExp: (LongVId: _id10544)))
                                                 (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: _id10545))))))))))))))))))))
                                 (ATExp:
                                  (PARAtExp:
                                   (APPExp:
                                    (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: h))) (SCONAtExp: (INTSCon: 0)))))
                                    (IDAtExp: (LongVId: source))))))))))))
                          (PARAtExp:
                           (ATExp:
                            (RECORDAtExp:
                             (ExpRow:
                              (Lab: |1|)
                              (ATExp: (IDAtExp: (LongVId: _id10546)))
                              (ExpRow:
                               (Lab: |2|)
                               (ATExp: (IDAtExp: (LongVId: _id10547)))
                               (ExpRow: (Lab: |3|) (ATExp: (IDAtExp: (LongVId: _id10548)))))))))))))))))))))))
            (SEQStrDec:
             (DECStrDec:
              (VALDec:
               (TyVarseq:)
               (RECValBind:
                (PLAINValBind:
                 (ATPat: (IDAtPat: (LongVId: scan)))
                 (FNExp:
                  (Match:
                   (Mrule:
                    (ATPat: (IDAtPat: (LongVId: _id10549)))
                    (FNExp:
                     (Match:
                      (Mrule:
                       (ATPat: (IDAtPat: (LongVId: _id10550)))
                       (APPExp:
                        (ATExp:
                         (PARAtExp:
                          (FNExp:
                           (Match:
                            (Mrule:
                             (ATPat:
                              (RECORDAtPat:
                               (FIELDPatRow:
                                (Lab: |1|)
                                (ATPat: (IDAtPat: (LongVId: getc)))
                                (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: source)))))))
                             (ATExp:
                              (LETAtExp:
                               (VALDec:
                                (TyVarseq:)
                                (PLAINValBind:
                                 (ATPat: (IDAtPat: (LongVId: src)))
                                 (ATExp:
                                  (PARAtExp:
                                   (APPExp:
                                    (ATExp:
                                     (PARAtExp:
                                      (APPExp:
                                       (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: StringCvt.dropl))) (IDAtExp: (LongVId: Char.isSpace)))))
                                       (IDAtExp: (LongVId: getc)))))
                                    (IDAtExp: (LongVId: source)))))))
                               (APPExp:
                                (ATExp:
                                 (PARAtExp:
                                  (FNExp:
                                   (Match:
                                    (Mrule:
                                     (ATPat: (PARAtPat: (CONPat: (LongVId: SOME) (IDAtPat: (LongVId: rest)))))
                                     (ATExp:
                                      (PARAtExp:
                                       (APPExp:
                                        (ATExp: (IDAtExp: (LongVId: SOME)))
                                        (RECORDAtExp:
                                         (ExpRow:
                                          (Lab: |1|)
                                          (ATExp: (IDAtExp: (LongVId: true)))
                                          (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: rest))))))))))
                                    (Match:
                                     (Mrule:
                                      (ATPat: (IDAtPat: (LongVId: NONE)))
                                      (APPExp:
                                       (ATExp:
                                        (PARAtExp:
                                         (FNExp:
                                          (Match:
                                           (Mrule:
                                            (ATPat: (PARAtPat: (CONPat: (LongVId: SOME) (IDAtPat: (LongVId: rest)))))
                                            (ATExp:
                                             (PARAtExp:
                                              (APPExp:
                                               (ATExp: (IDAtExp: (LongVId: SOME)))
                                               (RECORDAtExp:
                                                (ExpRow:
                                                 (Lab: |1|)
                                                 (ATExp: (IDAtExp: (LongVId: false)))
                                                 (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: rest))))))))))
                                           (Match: (Mrule: (ATPat: (IDAtPat: (LongVId: NONE))) (ATExp: (IDAtExp: (LongVId: NONE)))))))))
                                       (PARAtExp:
                                        (ATExp:
                                         (PARAtExp:
                                          (APPExp:
                                           (ATExp:
                                            (PARAtExp:
                                             (APPExp:
                                              (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: getstring))) (SCONAtExp: (STRINGSCon: "false")))))
                                              (IDAtExp: (LongVId: getc)))))
                                           (IDAtExp: (LongVId: src)))))))))))))
                                (PARAtExp:
                                 (ATExp:
                                  (PARAtExp:
                                   (APPExp:
                                    (ATExp:
                                     (PARAtExp:
                                      (APPExp:
                                       (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: getstring))) (SCONAtExp: (STRINGSCon: "true")))))
                                       (IDAtExp: (LongVId: getc)))))
                                    (IDAtExp: (LongVId: src))))))))))))))
                        (PARAtExp:
                         (ATExp:
                          (RECORDAtExp:
                           (ExpRow:
                            (Lab: |1|)
                            (ATExp: (IDAtExp: (LongVId: _id10549)))
                            (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: _id10550)))))))))))))))))))
             (DECStrDec:
              (VALDec:
               (TyVarseq:)
               (PLAINValBind:
                (ATPat: (IDAtPat: (LongVId: fromString)))
                (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: StringCvt.scanString))) (IDAtExp: (LongVId: scan))))))))))))
         (SEQStrDec: (EMPTYStrDec:) (EMPTYStrDec:))))))))))