/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.hs /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- MAYBE proof of /export/starexec/sandbox/benchmark/theBenchmark.hs # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty H-Termination with start terms of the given HASKELL could not be shown: (0) HASKELL (1) LR [EQUIVALENT, 0 ms] (2) HASKELL (3) CR [EQUIVALENT, 0 ms] (4) HASKELL (5) IFR [EQUIVALENT, 21 ms] (6) HASKELL (7) BR [EQUIVALENT, 0 ms] (8) HASKELL (9) COR [EQUIVALENT, 23 ms] (10) HASKELL (11) LetRed [EQUIVALENT, 0 ms] (12) HASKELL (13) NumRed [SOUND, 5 ms] (14) HASKELL ---------------------------------------- (0) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (1) LR (EQUIVALENT) Lambda Reductions: The following Lambda expression "\vu15->case vu15 of { (']' : [],t) -> ([],t) : []; _ -> []} " is transformed to "readl0 vu15 = case vu15 of { (']' : [],t) -> ([],t) : []; _ -> []} ; " The following Lambda expression "\vu16->case vu16 of { (xs,u) -> (x : xs,u) : []; _ -> []} " is transformed to "readl1 x vu16 = case vu16 of { (xs,u) -> (x : xs,u) : []; _ -> []} ; " The following Lambda expression "\vu17->case vu17 of { (x,t) -> concatMap (readl1 x) (readl' t); _ -> []} " is transformed to "readl2 vu17 = case vu17 of { (x,t) -> concatMap (readl1 x) (readl' t); _ -> []} ; " The following Lambda expression "\vu18->case vu18 of { (']' : [],t) -> ([],t) : []; _ -> []} " is transformed to "readl'0 vu18 = case vu18 of { (']' : [],t) -> ([],t) : []; _ -> []} ; " The following Lambda expression "\vu19->case vu19 of { (xs,v) -> (x : xs,v) : []; _ -> []} " is transformed to "readl'1 x vu19 = case vu19 of { (xs,v) -> (x : xs,v) : []; _ -> []} ; " The following Lambda expression "\vu20->case vu20 of { (x,u) -> concatMap (readl'1 x) (readl' u); _ -> []} " is transformed to "readl'2 vu20 = case vu20 of { (x,u) -> concatMap (readl'1 x) (readl' u); _ -> []} ; " The following Lambda expression "\vu21->case vu21 of { (',' : [],t) -> concatMap readl'2 (reads t); _ -> []} " is transformed to "readl'3 vu21 = case vu21 of { (',' : [],t) -> concatMap readl'2 (reads t); _ -> []} ; " The following Lambda expression "\vu13->case vu13 of { pr -> pr : []; _ -> []} " is transformed to "readList0 vu13 = case vu13 of { pr -> pr : []; _ -> []} ; " The following Lambda expression "\vu14->case vu14 of { ('[' : [],s) -> concatMap readList0 (readl s); _ -> []} " is transformed to "readList1 vu14 = case vu14 of { ('[' : [],s) -> concatMap readList0 (readl s); _ -> []} ; " The following Lambda expression "\r->concatMap readList1 (lex r)" is transformed to "readList2 r = concatMap readList1 (lex r); " The following Lambda expression "\vu31->case vu31 of { (y,u) -> (x % y,u) : []; _ -> []} " is transformed to "readsPrec0 x vu31 = case vu31 of { (y,u) -> (x % y,u) : []; _ -> []} ; " The following Lambda expression "\vu32->case vu32 of { ('%' : [],t) -> concatMap (readsPrec0 x) (reads t); _ -> []} " is transformed to "readsPrec1 x vu32 = case vu32 of { ('%' : [],t) -> concatMap (readsPrec0 x) (reads t); _ -> []} ; " The following Lambda expression "\vu33->case vu33 of { (x,s) -> concatMap (readsPrec1 x) (lex s); _ -> []} " is transformed to "readsPrec2 vu33 = case vu33 of { (x,s) -> concatMap (readsPrec1 x) (lex s); _ -> []} ; " The following Lambda expression "\r->concatMap readsPrec2 (reads r)" is transformed to "readsPrec3 r = concatMap readsPrec2 (reads r); " The following Lambda expression "\nd->n * radix + d" is transformed to "readInt0 radix n d = n * radix + d; " The following Lambda expression "\vu77->case vu77 of { (ds,r) -> (foldl1 (readInt0 radix) (map (fromIntegral . digToInt) ds),r) : []; _ -> []} " is transformed to "readInt1 radix digToInt vu77 = case vu77 of { (ds,r) -> (foldl1 (readInt0 radix) (map (fromIntegral . digToInt) ds),r) : []; _ -> []} ; " The following Lambda expression "\vu54->case vu54 of { (ch,''' : t) -> if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []; _ -> []} " is transformed to "lex0 vu54 = case vu54 of { (ch,''' : t) -> if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []; _ -> []} ; " The following Lambda expression "\vu56->case vu56 of { (str,u) -> (ch ++ str,u) : []; _ -> []} " is transformed to "lexString0 ch vu56 = case vu56 of { (str,u) -> (ch ++ str,u) : []; _ -> []} ; " The following Lambda expression "\vu57->case vu57 of { (ch,t) -> concatMap (lexString0 ch) (lexString t); _ -> []} " is transformed to "lexString1 vu57 = case vu57 of { (ch,t) -> concatMap (lexString0 ch) (lexString t); _ -> []} ; " The following Lambda expression "\vu58->case vu58 of { '\' : t -> ([],t) : []; _ -> []} " is transformed to "lexStrItem0 vu58 = case vu58 of { '\' : t -> ([],t) : []; _ -> []} ; " The following Lambda expression "\vu55->case vu55 of { (str,t) -> ('"' : str,t) : []; _ -> []} " is transformed to "lex1 vu55 = case vu55 of { (str,t) -> ('"' : str,t) : []; _ -> []} ; " The following Lambda expression "\vu63->case vu63 of { (e,u) -> ('.' : ds ++ e,u) : []; _ -> []} " is transformed to "lexFracExp0 ds vu63 = case vu63 of { (e,u) -> ('.' : ds ++ e,u) : []; _ -> []} ; " The following Lambda expression "\vu64->case vu64 of { (ds,t) -> concatMap (lexFracExp0 ds) (lexExp t); _ -> []} " is transformed to "lexFracExp1 vu64 = case vu64 of { (ds,t) -> concatMap (lexFracExp0 ds) (lexExp t); _ -> []} ; " The following Lambda expression "\vu65->case vu65 of { (ds,u) -> (e : c : ds,u) : []; _ -> []} " is transformed to "lexExp0 e c vu65 = case vu65 of { (ds,u) -> (e : c : ds,u) : []; _ -> []} ; " The following Lambda expression "\vu66->case vu66 of { c : t -> if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []; _ -> []} " is transformed to "lexExp1 e vu66 = case vu66 of { c : t -> if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []; _ -> []} ; " The following Lambda expression "\vu67->case vu67 of { (ds,t) -> (e : ds,t) : []; _ -> []} " is transformed to "lexExp2 e vu67 = case vu67 of { (ds,t) -> (e : ds,t) : []; _ -> []} ; " The following Lambda expression "\vu59->case vu59 of { (sym,t) -> (c : sym,t) : []; _ -> []} " is transformed to "lex2 c vu59 = case vu59 of { (sym,t) -> (c : sym,t) : []; _ -> []} ; " The following Lambda expression "\vu60->case vu60 of { (nam,t) -> (c : nam,t) : []; _ -> []} " is transformed to "lex3 c vu60 = case vu60 of { (nam,t) -> (c : nam,t) : []; _ -> []} ; " The following Lambda expression "\vu61->case vu61 of { (fe,t) -> (c : ds ++ fe,t) : []; _ -> []} " is transformed to "lex4 c ds vu61 = case vu61 of { (fe,t) -> (c : ds ++ fe,t) : []; _ -> []} ; " The following Lambda expression "\vu62->case vu62 of { (ds,s) -> concatMap (lex4 c ds) (lexFracExp s); _ -> []} " is transformed to "lex5 c vu62 = case vu62 of { (ds,s) -> concatMap (lex4 c ds) (lexFracExp s); _ -> []} ; " The following Lambda expression "\ab->(a,b)" is transformed to "zip0 a b = (a,b); " The following Lambda expression "\vu68->case vu68 of { (cs@(_ : _),t) -> (cs,t) : []; _ -> []} " is transformed to "nonnull0 vu68 = case vu68 of { (cs@(_ : _),t) -> (cs,t) : []; _ -> []} ; " The following Lambda expression "\vu48->case vu48 of { (')' : [],u) -> (x,u) : []; _ -> []} " is transformed to "mandatory0 x vu48 = case vu48 of { (')' : [],u) -> (x,u) : []; _ -> []} ; " The following Lambda expression "\vu49->case vu49 of { (x,t) -> concatMap (mandatory0 x) (lex t); _ -> []} " is transformed to "mandatory1 vu49 = case vu49 of { (x,t) -> concatMap (mandatory0 x) (lex t); _ -> []} ; " The following Lambda expression "\vu50->case vu50 of { ('(' : [],s) -> concatMap mandatory1 (optional s); _ -> []} " is transformed to "mandatory2 vu50 = case vu50 of { ('(' : [],s) -> concatMap mandatory1 (optional s); _ -> []} ; " The following Lambda expression "\vu80->case vu80 of { (n,[]) -> (n,s) : []; _ -> []} " is transformed to "read''0 s vu80 = case vu80 of { (n,[]) -> (n,s) : []; _ -> []} ; " The following Lambda expression "\vu81->case vu81 of { (str,s) -> concatMap (read''0 s) (readPos str); _ -> []} " is transformed to "read''1 readPos vu81 = case vu81 of { (str,s) -> concatMap (read''0 s) (readPos str); _ -> []} ; " The following Lambda expression "\vu78->case vu78 of { (x,t) -> (`negate` x,t) : []; _ -> []} " is transformed to "read'0 vu78 = case vu78 of { (x,t) -> (`negate` x,t) : []; _ -> []} ; " The following Lambda expression "\vu79->case vu79 of { ('-' : [],s) -> concatMap read'0 (read'' s); _ -> []} " is transformed to "read'1 vu79 = case vu79 of { ('-' : [],s) -> concatMap read'0 (read'' s); _ -> []} ; " The following Lambda expression "\d->fromEnum d - fromEnum_0" is transformed to "readDec0 d = fromEnum d - fromEnum_0; " The following Lambda expression "\vu69->case vu69 of { ([],s') -> (mne,s') : []; _ -> []} " is transformed to "lexEsc0 mne vu69 = case vu69 of { ([],s') -> (mne,s') : []; _ -> []} ; " The following Lambda expression "\vu70->case vu70 of { (c,mne) -> concatMap (lexEsc0 mne) (lexmatch mne s : []); _ -> []} " is transformed to "lexEsc1 s vu70 = case vu70 of { (c,mne) -> concatMap (lexEsc0 mne) (lexmatch mne s : []); _ -> []} ; " The following Lambda expression "\(_,zs)->zs" is transformed to "zs0 (_,zs) = zs; " The following Lambda expression "\(ys,_)->ys" is transformed to "ys0 (ys,_) = ys; " ---------------------------------------- (2) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (3) CR (EQUIVALENT) Case Reductions: The following Case expression "case vu20 of { (x,u) -> concatMap (readl'1 x) (readl' u); _ -> []} " is transformed to "readl'20 (x,u) = concatMap (readl'1 x) (readl' u); readl'20 _ = []; " The following Case expression "case vu19 of { (xs,v) -> (x : xs,v) : []; _ -> []} " is transformed to "readl'10 x (xs,v) = (x : xs,v) : []; readl'10 x _ = []; " The following Case expression "case vu21 of { (',' : [],t) -> concatMap readl'2 (reads t); _ -> []} " is transformed to "readl'30 (',' : [],t) = concatMap readl'2 (reads t); readl'30 _ = []; " The following Case expression "case vu17 of { (x,t) -> concatMap (readl1 x) (readl' t); _ -> []} " is transformed to "readl20 (x,t) = concatMap (readl1 x) (readl' t); readl20 _ = []; " The following Case expression "case vu18 of { (']' : [],t) -> ([],t) : []; _ -> []} " is transformed to "readl'00 (']' : [],t) = ([],t) : []; readl'00 _ = []; " The following Case expression "case vu14 of { ('[' : [],s) -> concatMap readList0 (readl s); _ -> []} " is transformed to "readList10 ('[' : [],s) = concatMap readList0 (readl s); readList10 _ = []; " The following Case expression "case vu13 of { pr -> pr : []; _ -> []} " is transformed to "readList00 pr = pr : []; readList00 _ = []; " The following Case expression "case vu16 of { (xs,u) -> (x : xs,u) : []; _ -> []} " is transformed to "readl10 x (xs,u) = (x : xs,u) : []; readl10 x _ = []; " The following Case expression "case vu15 of { (']' : [],t) -> ([],t) : []; _ -> []} " is transformed to "readl00 (']' : [],t) = ([],t) : []; readl00 _ = []; " The following Case expression "case vu77 of { (ds,r) -> (foldl1 (readInt0 radix) (map (fromIntegral . digToInt) ds),r) : []; _ -> []} " is transformed to "readInt10 radix digToInt (ds,r) = (foldl1 (readInt0 radix) (map (fromIntegral . digToInt) ds),r) : []; readInt10 radix digToInt _ = []; " The following Case expression "case vu55 of { (str,t) -> ('"' : str,t) : []; _ -> []} " is transformed to "lex10 (str,t) = ('"' : str,t) : []; lex10 _ = []; " The following Case expression "case vu57 of { (ch,t) -> concatMap (lexString0 ch) (lexString t); _ -> []} " is transformed to "lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 _ = []; " The following Case expression "case vu56 of { (str,u) -> (ch ++ str,u) : []; _ -> []} " is transformed to "lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch _ = []; " The following Case expression "case vu58 of { '\' : t -> ([],t) : []; _ -> []} " is transformed to "lexStrItem00 ('\' : t) = ([],t) : []; lexStrItem00 _ = []; " The following Case expression "case vu59 of { (sym,t) -> (c : sym,t) : []; _ -> []} " is transformed to "lex20 c (sym,t) = (c : sym,t) : []; lex20 c _ = []; " The following Case expression "case vu67 of { (ds,t) -> (e : ds,t) : []; _ -> []} " is transformed to "lexExp20 e (ds,t) = (e : ds,t) : []; lexExp20 e _ = []; " The following Case expression "case vu65 of { (ds,u) -> (e : c : ds,u) : []; _ -> []} " is transformed to "lexExp00 e c (ds,u) = (e : c : ds,u) : []; lexExp00 e c _ = []; " The following Case expression "case vu62 of { (ds,s) -> concatMap (lex4 c ds) (lexFracExp s); _ -> []} " is transformed to "lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c _ = []; " The following Case expression "case vu66 of { c : t -> if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []; _ -> []} " is transformed to "lexExp10 e (c : t) = if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []; lexExp10 e _ = []; " The following Case expression "case vu60 of { (nam,t) -> (c : nam,t) : []; _ -> []} " is transformed to "lex30 c (nam,t) = (c : nam,t) : []; lex30 c _ = []; " The following Case expression "case vu61 of { (fe,t) -> (c : ds ++ fe,t) : []; _ -> []} " is transformed to "lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds _ = []; " The following Case expression "case vu63 of { (e,u) -> ('.' : ds ++ e,u) : []; _ -> []} " is transformed to "lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds _ = []; " The following Case expression "case vu64 of { (ds,t) -> concatMap (lexFracExp0 ds) (lexExp t); _ -> []} " is transformed to "lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 _ = []; " The following Case expression "case vu33 of { (x,s) -> concatMap (readsPrec1 x) (lex s); _ -> []} " is transformed to "readsPrec20 (x,s) = concatMap (readsPrec1 x) (lex s); readsPrec20 _ = []; " The following Case expression "case vu32 of { ('%' : [],t) -> concatMap (readsPrec0 x) (reads t); _ -> []} " is transformed to "readsPrec10 x ('%' : [],t) = concatMap (readsPrec0 x) (reads t); readsPrec10 x _ = []; " The following Case expression "case vu31 of { (y,u) -> (x % y,u) : []; _ -> []} " is transformed to "readsPrec00 x (y,u) = (x % y,u) : []; readsPrec00 x _ = []; " The following Case expression "case vu54 of { (ch,''' : t) -> if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []; _ -> []} " is transformed to "lex00 (ch,''' : t) = if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []; lex00 _ = []; " The following Case expression "case vu48 of { (')' : [],u) -> (x,u) : []; _ -> []} " is transformed to "mandatory00 x (')' : [],u) = (x,u) : []; mandatory00 x _ = []; " The following Case expression "case vu49 of { (x,t) -> concatMap (mandatory0 x) (lex t); _ -> []} " is transformed to "mandatory10 (x,t) = concatMap (mandatory0 x) (lex t); mandatory10 _ = []; " The following Case expression "case vu50 of { ('(' : [],s) -> concatMap mandatory1 (optional s); _ -> []} " is transformed to "mandatory20 ('(' : [],s) = concatMap mandatory1 (optional s); mandatory20 _ = []; " The following Case expression "case vu68 of { (cs@(_ : _),t) -> (cs,t) : []; _ -> []} " is transformed to "nonnull00 (cs@(_ : _),t) = (cs,t) : []; nonnull00 _ = []; " The following Case expression "case vu79 of { ('-' : [],s) -> concatMap read'0 (read'' s); _ -> []} " is transformed to "read'10 ('-' : [],s) = concatMap read'0 (read'' s); read'10 _ = []; " The following Case expression "case vu78 of { (x,t) -> (`negate` x,t) : []; _ -> []} " is transformed to "read'00 (x,t) = (`negate` x,t) : []; read'00 _ = []; " The following Case expression "case vu80 of { (n,[]) -> (n,s) : []; _ -> []} " is transformed to "read''00 s (n,[]) = (n,s) : []; read''00 s _ = []; " The following Case expression "case vu81 of { (str,s) -> concatMap (read''0 s) (readPos str); _ -> []} " is transformed to "read''10 readPos (str,s) = concatMap (read''0 s) (readPos str); read''10 readPos _ = []; " The following Case expression "case concatMap (lexEsc1 s) table of { pr : _ -> pr : []; [] -> []} " is transformed to "lexEsc2 (pr : _) = pr : []; lexEsc2 [] = []; " The following Case expression "case vu69 of { ([],s') -> (mne,s') : []; _ -> []} " is transformed to "lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne _ = []; " The following Case expression "case vu70 of { (c,mne) -> concatMap (lexEsc0 mne) (lexmatch mne s : []); _ -> []} " is transformed to "lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s _ = []; " ---------------------------------------- (4) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (5) IFR (EQUIVALENT) If Reductions: The following If expression "if c `elem` '+' : '-' : [] then concatMap (lexExp0 e c) (lexDigits t) else []" is transformed to "lexExp100 e c t True = concatMap (lexExp0 e c) (lexDigits t); lexExp100 e c t False = []; " The following If expression "if primGEqNatS x y then Succ (primDivNatS (primMinusNatS x y) (Succ y)) else Zero" is transformed to "primDivNatS0 x y True = Succ (primDivNatS (primMinusNatS x y) (Succ y)); primDivNatS0 x y False = Zero; " The following If expression "if ch /= ''' : [] then (''' : ch ++ ''' : [],t) : [] else []" is transformed to "lex000 ch t True = (''' : ch ++ ''' : [],t) : []; lex000 ch t False = []; " The following If expression "if b then mandatory else optional" is transformed to "readParen0 True = mandatory; readParen0 False = optional; " The following If expression "if primGEqNatS x y then primModNatS (primMinusNatS x y) (Succ y) else Succ x" is transformed to "primModNatS0 x y True = primModNatS (primMinusNatS x y) (Succ y); primModNatS0 x y False = Succ x; " ---------------------------------------- (6) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (7) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. Binding Reductions: The bind variable of the following binding Pattern "xs@(vvy : vvz)" is replaced by the following term "vvy : vvz" The bind variable of the following binding Pattern "xs@(vwv : vww)" is replaced by the following term "vwv : vww" The bind variable of the following binding Pattern "cs@(vxv : vxw)" is replaced by the following term "vxv : vxw" The bind variable of the following binding Pattern "s@(wuu : wuv)" is replaced by the following term "wuu : wuv" ---------------------------------------- (8) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (9) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "readl'00 (']' : [],t) = ([],t) : []; readl'00 vw = []; " is transformed to "readl'00 (wvw : wvx,t) = readl'002 (wvw : wvx,t); readl'00 vw = readl'000 vw; " "readl'000 vw = []; " "readl'001 True (wvw : [],t) = ([],t) : []; readl'001 wvy wvz = readl'000 wvz; " "readl'002 (wvw : wvx,t) = readl'001 (wvw == ']') (wvw : wvx,t); readl'002 wwu = readl'000 wwu; " The following Function with conditions "readList10 ('[' : [],s) = concatMap readList0 (readl s); readList10 vx = []; " is transformed to "readList10 (wwx : wwy,s) = readList102 (wwx : wwy,s); readList10 vx = readList100 vx; " "readList100 vx = []; " "readList101 True (wwx : [],s) = concatMap readList0 (readl s); readList101 wwz wxu = readList100 wxu; " "readList102 (wwx : wwy,s) = readList101 (wwx == '[') (wwx : wwy,s); readList102 wxv = readList100 wxv; " The following Function with conditions "readl00 (']' : [],t) = ([],t) : []; readl00 wu = []; " is transformed to "readl00 (wxy : wxz,t) = readl002 (wxy : wxz,t); readl00 wu = readl000 wu; " "readl000 wu = []; " "readl001 True (wxy : [],t) = ([],t) : []; readl001 wyu wyv = readl000 wyv; " "readl002 (wxy : wxz,t) = readl001 (wxy == ']') (wxy : wxz,t); readl002 wyw = readl000 wyw; " The following Function with conditions "readl'30 (',' : [],t) = concatMap readl'2 (reads t); readl'30 ww = []; " is transformed to "readl'30 (wyz : wzu,t) = readl'302 (wyz : wzu,t); readl'30 ww = readl'300 ww; " "readl'300 ww = []; " "readl'301 True (wyz : [],t) = concatMap readl'2 (reads t); readl'301 wzv wzw = readl'300 wzw; " "readl'302 (wyz : wzu,t) = readl'301 (wyz == ',') (wyz : wzu,t); readl'302 wzx = readl'300 wzx; " The following Function with conditions "takeWhile p [] = []; takeWhile p (x : xs)|p xx : takeWhile p xs|otherwise[]; " is transformed to "takeWhile p [] = takeWhile3 p []; takeWhile p (x : xs) = takeWhile2 p (x : xs); " "takeWhile0 p x xs True = []; " "takeWhile1 p x xs True = x : takeWhile p xs; takeWhile1 p x xs False = takeWhile0 p x xs otherwise; " "takeWhile2 p (x : xs) = takeWhile1 p x xs (p x); " "takeWhile3 p [] = []; takeWhile3 xuu xuv = takeWhile2 xuu xuv; " The following Function with conditions "gcd' x 0 = x; gcd' x y = gcd' y (x `rem` y); " is transformed to "gcd' x xuw = gcd'2 x xuw; gcd' x y = gcd'0 x y; " "gcd'0 x y = gcd' y (x `rem` y); " "gcd'1 True x xuw = x; gcd'1 xux xuy xuz = gcd'0 xuy xuz; " "gcd'2 x xuw = gcd'1 (xuw == 0) x xuw; gcd'2 xvu xvv = gcd'0 xvu xvv; " The following Function with conditions "gcd 0 0 = error []; gcd x y = gcd' (abs x) (abs y) where { gcd' x 0 = x; gcd' x y = gcd' y (x `rem` y); } ; " is transformed to "gcd xvw xvx = gcd3 xvw xvx; gcd x y = gcd0 x y; " "gcd0 x y = gcd' (abs x) (abs y) where { gcd' x xuw = gcd'2 x xuw; gcd' x y = gcd'0 x y; ; gcd'0 x y = gcd' y (x `rem` y); ; gcd'1 True x xuw = x; gcd'1 xux xuy xuz = gcd'0 xuy xuz; ; gcd'2 x xuw = gcd'1 (xuw == 0) x xuw; gcd'2 xvu xvv = gcd'0 xvu xvv; } ; " "gcd1 True xvw xvx = error []; gcd1 xvy xvz xwu = gcd0 xvz xwu; " "gcd2 True xvw xvx = gcd1 (xvx == 0) xvw xvx; gcd2 xwv xww xwx = gcd0 xww xwx; " "gcd3 xvw xvx = gcd2 (xvw == 0) xvw xvx; gcd3 xwy xwz = gcd0 xwy xwz; " The following Function with conditions "lexString ('"' : s) = ('"' : [],s) : []; lexString s = concatMap lexString1 (lexStrItem s); " is transformed to "lexString (xxv : s) = lexString4 (xxv : s); lexString s = lexString2 s; " "lexString2 s = concatMap lexString1 (lexStrItem s); " "lexString3 True (xxv : s) = ('"' : [],s) : []; lexString3 xxw xxx = lexString2 xxx; " "lexString4 (xxv : s) = lexString3 (xxv == '"') (xxv : s); lexString4 xxy = lexString2 xxy; " The following Function with conditions "lexStrItem ('\' : '&' : s) = ('\' : '&' : [],s) : []; lexStrItem ('\' : c : s)|isSpace cconcatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem s = lexLitChar s; " is transformed to "lexStrItem (xzw : yuu) = lexStrItem7 (xzw : yuu); lexStrItem (xyu : xyx) = lexStrItem4 (xyu : xyx); lexStrItem s = lexStrItem1 s; " "lexStrItem1 s = lexLitChar s; " "lexStrItem2 xyu c s True = concatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem2 xyu c s False = lexStrItem1 (xyu : c : s); " "lexStrItem3 True (xyu : c : s) = lexStrItem2 xyu c s (isSpace c); lexStrItem3 xyy xyz = lexStrItem1 xyz; " "lexStrItem4 (xyu : xyx) = lexStrItem3 (xyu == '\') (xyu : xyx); lexStrItem4 xzu = lexStrItem1 xzu; " "lexStrItem5 True (xzw : xzy : s) = ('\' : '&' : [],s) : []; lexStrItem5 yuv yuw = lexStrItem4 yuw; " "lexStrItem6 True (xzw : xzy : s) = lexStrItem5 (xzy == '&') (xzw : xzy : s); lexStrItem6 yux yuy = lexStrItem4 yuy; " "lexStrItem7 (xzw : yuu) = lexStrItem6 (xzw == '\') (xzw : yuu); lexStrItem7 yuz = lexStrItem4 yuz; " The following Function with conditions "lexStrItem00 ('\' : t) = ([],t) : []; lexStrItem00 yy = []; " is transformed to "lexStrItem00 (yvv : t) = lexStrItem002 (yvv : t); lexStrItem00 yy = lexStrItem000 yy; " "lexStrItem000 yy = []; " "lexStrItem001 True (yvv : t) = ([],t) : []; lexStrItem001 yvw yvx = lexStrItem000 yvx; " "lexStrItem002 (yvv : t) = lexStrItem001 (yvv == '\') (yvv : t); lexStrItem002 yvy = lexStrItem000 yvy; " The following Function with conditions "lexExp (e : s)|e `elem` 'e' : 'E' : []concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp s = ([],s) : []; " is transformed to "lexExp (e : s) = lexExp5 (e : s); lexExp s = lexExp3 s; " "lexExp3 s = ([],s) : []; " "lexExp4 e s True = concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp4 e s False = lexExp3 (e : s); " "lexExp5 (e : s) = lexExp4 e s (e `elem` 'e' : 'E' : []); lexExp5 ywu = lexExp3 ywu; " The following Function with conditions "lexFracExp ('.' : c : cs)|isDigit cconcatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp s = lexExp s; " is transformed to "lexFracExp (yww : ywz) = lexFracExp5 (yww : ywz); lexFracExp s = lexFracExp2 s; " "lexFracExp2 s = lexExp s; " "lexFracExp3 yww c cs True = concatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp3 yww c cs False = lexFracExp2 (yww : c : cs); " "lexFracExp4 True (yww : c : cs) = lexFracExp3 yww c cs (isDigit c); lexFracExp4 yxu yxv = lexFracExp2 yxv; " "lexFracExp5 (yww : ywz) = lexFracExp4 (yww == '.') (yww : ywz); lexFracExp5 yxw = lexFracExp2 yxw; " The following Function with conditions "lex [] = ([],[]) : []; lex (c : s)|isSpace clex (dropWhile isSpace s); lex (''' : s) = concatMap lex0 (lexLitChar s); lex ('"' : s) = concatMap lex1 (lexString s) where { lex1 vu55 = lex10 vu55; ; lex10 (str,t) = ('"' : str,t) : []; lex10 yz = []; ; lexStrItem ('\' : '&' : s) = ('\' : '&' : [],s) : []; lexStrItem ('\' : c : s)|isSpace cconcatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem s = lexLitChar s; ; lexStrItem0 vu58 = lexStrItem00 vu58; ; lexStrItem00 ('\' : t) = ([],t) : []; lexStrItem00 yy = []; ; lexString ('"' : s) = ('"' : [],s) : []; lexString s = concatMap lexString1 (lexStrItem s); ; lexString0 ch vu56 = lexString00 ch vu56; ; lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch yw = []; ; lexString1 vu57 = lexString10 vu57; ; lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 yx = []; } ; lex (c : s)|isSingle c(c : [],s) : []|isSym cconcatMap (lex2 c) (span isSym s : [])|isAlpha cconcatMap (lex3 c) (span isIdChar s : [])|isDigit cconcatMap (lex5 c) (span isDigit s : [])|otherwise[] where { isIdChar c = isAlphaNum c || c `elem` '_' : ''' : []; ; isSingle c = c `elem` ',' : ';' : '(' : ')' : '[' : ']' : '{' : '}' : '_' : '`' : []; ; isSym c = c `elem` '!' : '@' : '#' : '$' : '%' : '&' : '*' : '+' : '.' : '/' : '<' : '=' : '>' : '?' : '\' : '^' : '|' : ':' : '-' : '~' : []; ; lex2 c vu59 = lex20 c vu59; ; lex20 c (sym,t) = (c : sym,t) : []; lex20 c vuv = []; ; lex3 c vu60 = lex30 c vu60; ; lex30 c (nam,t) = (c : nam,t) : []; lex30 c vuw = []; ; lex4 c ds vu61 = lex40 c ds vu61; ; lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds zz = []; ; lex5 c vu62 = lex50 c vu62; ; lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c vuu = []; ; lexExp (e : s)|e `elem` 'e' : 'E' : []concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp s = ([],s) : []; ; lexExp0 e c vu65 = lexExp00 e c vu65; ; lexExp00 e c (ds,u) = (e : c : ds,u) : []; lexExp00 e c zu = []; ; lexExp1 e vu66 = lexExp10 e vu66; ; lexExp10 e (c : t) = lexExp100 e c t (c `elem` '+' : '-' : []); lexExp10 e zw = []; ; lexExp100 e c t True = concatMap (lexExp0 e c) (lexDigits t); lexExp100 e c t False = []; ; lexExp2 e vu67 = lexExp20 e vu67; ; lexExp20 e (ds,t) = (e : ds,t) : []; lexExp20 e zv = []; ; lexFracExp ('.' : c : cs)|isDigit cconcatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp s = lexExp s; ; lexFracExp0 ds vu63 = lexFracExp00 ds vu63; ; lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds zy = []; ; lexFracExp1 vu64 = lexFracExp10 vu64; ; lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 zx = []; } ; " is transformed to "lex [] = lex19 []; lex (c : s) = lex18 (c : s); lex (yyy : s) = lex16 (yyy : s); lex (yxz : s) = lex14 (yxz : s); lex (c : s) = lex12 (c : s); " "lex12 (c : s) = lex11 c s (isSingle c) where { isIdChar c = isAlphaNum c || c `elem` '_' : ''' : []; ; isSingle c = c `elem` ',' : ';' : '(' : ')' : '[' : ']' : '{' : '}' : '_' : '`' : []; ; isSym c = c `elem` '!' : '@' : '#' : '$' : '%' : '&' : '*' : '+' : '.' : '/' : '<' : '=' : '>' : '?' : '\' : '^' : '|' : ':' : '-' : '~' : []; ; lex11 c s True = (c : [],s) : []; lex11 c s False = lex9 c s (isSym c); ; lex2 c vu59 = lex20 c vu59; ; lex20 c (sym,t) = (c : sym,t) : []; lex20 c vuv = []; ; lex3 c vu60 = lex30 c vu60; ; lex30 c (nam,t) = (c : nam,t) : []; lex30 c vuw = []; ; lex4 c ds vu61 = lex40 c ds vu61; ; lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds zz = []; ; lex5 c vu62 = lex50 c vu62; ; lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c vuu = []; ; lex6 c s True = []; ; lex7 c s True = concatMap (lex5 c) (span isDigit s : []); lex7 c s False = lex6 c s otherwise; ; lex8 c s True = concatMap (lex3 c) (span isIdChar s : []); lex8 c s False = lex7 c s (isDigit c); ; lex9 c s True = concatMap (lex2 c) (span isSym s : []); lex9 c s False = lex8 c s (isAlpha c); ; lexExp (e : s) = lexExp5 (e : s); lexExp s = lexExp3 s; ; lexExp0 e c vu65 = lexExp00 e c vu65; ; lexExp00 e c (ds,u) = (e : c : ds,u) : []; lexExp00 e c zu = []; ; lexExp1 e vu66 = lexExp10 e vu66; ; lexExp10 e (c : t) = lexExp100 e c t (c `elem` '+' : '-' : []); lexExp10 e zw = []; ; lexExp100 e c t True = concatMap (lexExp0 e c) (lexDigits t); lexExp100 e c t False = []; ; lexExp2 e vu67 = lexExp20 e vu67; ; lexExp20 e (ds,t) = (e : ds,t) : []; lexExp20 e zv = []; ; lexExp3 s = ([],s) : []; ; lexExp4 e s True = concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp4 e s False = lexExp3 (e : s); ; lexExp5 (e : s) = lexExp4 e s (e `elem` 'e' : 'E' : []); lexExp5 ywu = lexExp3 ywu; ; lexFracExp (yww : ywz) = lexFracExp5 (yww : ywz); lexFracExp s = lexFracExp2 s; ; lexFracExp0 ds vu63 = lexFracExp00 ds vu63; ; lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds zy = []; ; lexFracExp1 vu64 = lexFracExp10 vu64; ; lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 zx = []; ; lexFracExp2 s = lexExp s; ; lexFracExp3 yww c cs True = concatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp3 yww c cs False = lexFracExp2 (yww : c : cs); ; lexFracExp4 True (yww : c : cs) = lexFracExp3 yww c cs (isDigit c); lexFracExp4 yxu yxv = lexFracExp2 yxv; ; lexFracExp5 (yww : ywz) = lexFracExp4 (yww == '.') (yww : ywz); lexFracExp5 yxw = lexFracExp2 yxw; } ; " "lex13 True (yxz : s) = concatMap lex1 (lexString s) where { lex1 vu55 = lex10 vu55; ; lex10 (str,t) = ('"' : str,t) : []; lex10 yz = []; ; lexStrItem (xzw : yuu) = lexStrItem7 (xzw : yuu); lexStrItem (xyu : xyx) = lexStrItem4 (xyu : xyx); lexStrItem s = lexStrItem1 s; ; lexStrItem0 vu58 = lexStrItem00 vu58; ; lexStrItem00 (yvv : t) = lexStrItem002 (yvv : t); lexStrItem00 yy = lexStrItem000 yy; ; lexStrItem000 yy = []; ; lexStrItem001 True (yvv : t) = ([],t) : []; lexStrItem001 yvw yvx = lexStrItem000 yvx; ; lexStrItem002 (yvv : t) = lexStrItem001 (yvv == '\') (yvv : t); lexStrItem002 yvy = lexStrItem000 yvy; ; lexStrItem1 s = lexLitChar s; ; lexStrItem2 xyu c s True = concatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem2 xyu c s False = lexStrItem1 (xyu : c : s); ; lexStrItem3 True (xyu : c : s) = lexStrItem2 xyu c s (isSpace c); lexStrItem3 xyy xyz = lexStrItem1 xyz; ; lexStrItem4 (xyu : xyx) = lexStrItem3 (xyu == '\') (xyu : xyx); lexStrItem4 xzu = lexStrItem1 xzu; ; lexStrItem5 True (xzw : xzy : s) = ('\' : '&' : [],s) : []; lexStrItem5 yuv yuw = lexStrItem4 yuw; ; lexStrItem6 True (xzw : xzy : s) = lexStrItem5 (xzy == '&') (xzw : xzy : s); lexStrItem6 yux yuy = lexStrItem4 yuy; ; lexStrItem7 (xzw : yuu) = lexStrItem6 (xzw == '\') (xzw : yuu); lexStrItem7 yuz = lexStrItem4 yuz; ; lexString (xxv : s) = lexString4 (xxv : s); lexString s = lexString2 s; ; lexString0 ch vu56 = lexString00 ch vu56; ; lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch yw = []; ; lexString1 vu57 = lexString10 vu57; ; lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 yx = []; ; lexString2 s = concatMap lexString1 (lexStrItem s); ; lexString3 True (xxv : s) = ('"' : [],s) : []; lexString3 xxw xxx = lexString2 xxx; ; lexString4 (xxv : s) = lexString3 (xxv == '"') (xxv : s); lexString4 xxy = lexString2 xxy; } ; lex13 yyu yyv = lex12 yyv; " "lex14 (yxz : s) = lex13 (yxz == '"') (yxz : s); lex14 yyw = lex12 yyw; " "lex15 True (yyy : s) = concatMap lex0 (lexLitChar s); lex15 yyz yzu = lex14 yzu; " "lex16 (yyy : s) = lex15 (yyy == ''') (yyy : s); lex16 yzv = lex14 yzv; " "lex17 c s True = lex (dropWhile isSpace s); lex17 c s False = lex16 (c : s); " "lex18 (c : s) = lex17 c s (isSpace c); lex18 yzx = lex16 yzx; " "lex19 [] = ([],[]) : []; lex19 yzz = lex18 yzz; " The following Function with conditions "reduce x y|y == 0error []|otherwisex `quot` d :% (y `quot` d) where { d = gcd x y; } ; " is transformed to "reduce x y = reduce2 x y; " "reduce2 x y = reduce1 x y (y == 0) where { d = gcd x y; ; reduce0 x y True = x `quot` d :% (y `quot` d); ; reduce1 x y True = error []; reduce1 x y False = reduce0 x y otherwise; } ; " The following Function with conditions "readsPrec10 x ('%' : [],t) = concatMap (readsPrec0 x) (reads t); readsPrec10 x vuz = []; " is transformed to "readsPrec10 x (zuw : zux,t) = readsPrec102 x (zuw : zux,t); readsPrec10 x vuz = readsPrec100 x vuz; " "readsPrec100 x vuz = []; " "readsPrec101 True x (zuw : [],t) = concatMap (readsPrec0 x) (reads t); readsPrec101 zuy zuz zvu = readsPrec100 zuz zvu; " "readsPrec102 x (zuw : zux,t) = readsPrec101 (zuw == '%') x (zuw : zux,t); readsPrec102 zvv zvw = readsPrec100 zvv zvw; " The following Function with conditions "signumReal x|x == 00|x > 01|otherwise-1; " is transformed to "signumReal x = signumReal3 x; " "signumReal2 x True = 0; signumReal2 x False = signumReal1 x (x > 0); " "signumReal0 x True = -1; " "signumReal1 x True = 1; signumReal1 x False = signumReal0 x otherwise; " "signumReal3 x = signumReal2 x (x == 0); " The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " The following Function with conditions "dropWhile p [] = []; dropWhile p (vvy : vvz)|p vvydropWhile p vvz|otherwisevvy : vvz; " is transformed to "dropWhile p [] = dropWhile3 p []; dropWhile p (vvy : vvz) = dropWhile2 p (vvy : vvz); " "dropWhile1 p vvy vvz True = dropWhile p vvz; dropWhile1 p vvy vvz False = dropWhile0 p vvy vvz otherwise; " "dropWhile0 p vvy vvz True = vvy : vvz; " "dropWhile2 p (vvy : vvz) = dropWhile1 p vvy vvz (p vvy); " "dropWhile3 p [] = []; dropWhile3 zvz zwu = dropWhile2 zvz zwu; " The following Function with conditions "lex00 (ch,''' : t) = lex000 ch t (ch /= ''' : []); lex00 vwu = []; " is transformed to "lex00 (ch,zwx : t) = lex003 (ch,zwx : t); lex00 vwu = lex001 vwu; " "lex001 vwu = []; " "lex002 True (ch,zwx : t) = lex000 ch t (ch /= ''' : []); lex002 zwy zwz = lex001 zwz; " "lex003 (ch,zwx : t) = lex002 (zwx == ''') (ch,zwx : t); lex003 zxu = lex001 zxu; " The following Function with conditions "span p [] = ([],[]); span p (vwv : vww)|p vwv(vwv : ys,zs)|otherwise([],vwv : vww) where { vu43 = span p vww; ; ys = ys0 vu43; ; ys0 (ys,vwy) = ys; ; zs = zs0 vu43; ; zs0 (vwx,zs) = zs; } ; " is transformed to "span p [] = span3 p []; span p (vwv : vww) = span2 p (vwv : vww); " "span2 p (vwv : vww) = span1 p vwv vww (p vwv) where { span0 p vwv vww True = ([],vwv : vww); ; span1 p vwv vww True = (vwv : ys,zs); span1 p vwv vww False = span0 p vwv vww otherwise; ; vu43 = span p vww; ; ys = ys0 vu43; ; ys0 (ys,vwy) = ys; ; zs = zs0 vu43; ; zs0 (vwx,zs) = zs; } ; " "span3 p [] = ([],[]); span3 zxx zxy = span2 zxx zxy; " The following Function with conditions "lexmatch (x : xs) (y : ys)|x == ylexmatch xs ys; lexmatch xs ys = (xs,ys); " is transformed to "lexmatch (x : xs) (y : ys) = lexmatch2 (x : xs) (y : ys); lexmatch xs ys = lexmatch0 xs ys; " "lexmatch0 xs ys = (xs,ys); " "lexmatch1 x xs y ys True = lexmatch xs ys; lexmatch1 x xs y ys False = lexmatch0 (x : xs) (y : ys); " "lexmatch2 (x : xs) (y : ys) = lexmatch1 x xs y ys (x == y); lexmatch2 zyv zyw = lexmatch0 zyv zyw; " The following Function with conditions "absReal x|x >= 0x|otherwise`negate` x; " is transformed to "absReal x = absReal2 x; " "absReal0 x True = `negate` x; " "absReal1 x True = x; absReal1 x False = absReal0 x otherwise; " "absReal2 x = absReal1 x (x >= 0); " The following Function with conditions "mandatory20 ('(' : [],s) = concatMap mandatory1 (optional s); mandatory20 vyy = []; " is transformed to "mandatory20 (zyz : zzu,s) = mandatory202 (zyz : zzu,s); mandatory20 vyy = mandatory200 vyy; " "mandatory200 vyy = []; " "mandatory201 True (zyz : [],s) = concatMap mandatory1 (optional s); mandatory201 zzv zzw = mandatory200 zzw; " "mandatory202 (zyz : zzu,s) = mandatory201 (zyz == '(') (zyz : zzu,s); mandatory202 zzx = mandatory200 zzx; " The following Function with conditions "mandatory00 x (')' : [],u) = (x,u) : []; mandatory00 x vyz = []; " is transformed to "mandatory00 x (vuuu : vuuv,u) = mandatory002 x (vuuu : vuuv,u); mandatory00 x vyz = mandatory000 x vyz; " "mandatory000 x vyz = []; " "mandatory001 True x (vuuu : [],u) = (x,u) : []; mandatory001 vuuw vuux vuuy = mandatory000 vuux vuuy; " "mandatory002 x (vuuu : vuuv,u) = mandatory001 (vuuu == ')') x (vuuu : vuuv,u); mandatory002 vuuz vuvu = mandatory000 vuuz vuvu; " The following Function with conditions "read'10 ('-' : [],s) = concatMap read'0 (read'' s); read'10 vzx = []; " is transformed to "read'10 (vuvx : vuvy,s) = read'102 (vuvx : vuvy,s); read'10 vzx = read'100 vzx; " "read'100 vzx = []; " "read'101 True (vuvx : [],s) = concatMap read'0 (read'' s); read'101 vuvz vuwu = read'100 vuwu; " "read'102 (vuvx : vuvy,s) = read'101 (vuvx == '-') (vuvx : vuvy,s); read'102 vuwv = read'100 vuwv; " The following Function with conditions "lexEsc (c : s)|c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : [](c : [],s) : []; lexEsc ('^' : c : s)|c >= '@' && c <= '_'('^' : c : [],s) : []; lexEsc ('o' : s) = prefix 'o' (span isOctDigit s) : []; lexEsc ('x' : s) = prefix 'x' (span isHexDigit s) : []; lexEsc (wuu : wuv)|isDigit wuuspan isDigit (wuu : wuv) : []|isUpper wuulexEsc2 (concatMap (lexEsc1 (wuu : wuv)) table); lexEsc wuw = []; " is transformed to "lexEsc (c : s) = lexEsc16 (c : s); lexEsc (vuyx : vuzu) = lexEsc14 (vuyx : vuzu); lexEsc (vuxy : s) = lexEsc11 (vuxy : s); lexEsc (vuwz : s) = lexEsc8 (vuwz : s); lexEsc (wuu : wuv) = lexEsc6 (wuu : wuv); lexEsc wuw = lexEsc3 wuw; " "lexEsc3 wuw = []; " "lexEsc5 wuu wuv True = span isDigit (wuu : wuv) : []; lexEsc5 wuu wuv False = lexEsc4 wuu wuv (isUpper wuu); " "lexEsc4 wuu wuv True = lexEsc2 (concatMap (lexEsc1 (wuu : wuv)) table); lexEsc4 wuu wuv False = lexEsc3 (wuu : wuv); " "lexEsc6 (wuu : wuv) = lexEsc5 wuu wuv (isDigit wuu); lexEsc6 vuwx = lexEsc3 vuwx; " "lexEsc7 True (vuwz : s) = prefix 'x' (span isHexDigit s) : []; lexEsc7 vuxu vuxv = lexEsc6 vuxv; " "lexEsc8 (vuwz : s) = lexEsc7 (vuwz == 'x') (vuwz : s); lexEsc8 vuxw = lexEsc6 vuxw; " "lexEsc9 True (vuxy : s) = prefix 'o' (span isOctDigit s) : []; lexEsc9 vuxz vuyu = lexEsc8 vuyu; " "lexEsc11 (vuxy : s) = lexEsc9 (vuxy == 'o') (vuxy : s); lexEsc11 vuyv = lexEsc8 vuyv; " "lexEsc12 vuyx c s True = ('^' : c : [],s) : []; lexEsc12 vuyx c s False = lexEsc11 (vuyx : c : s); " "lexEsc13 True (vuyx : c : s) = lexEsc12 vuyx c s (c >= '@' && c <= '_'); lexEsc13 vuzv vuzw = lexEsc11 vuzw; " "lexEsc14 (vuyx : vuzu) = lexEsc13 (vuyx == '^') (vuyx : vuzu); lexEsc14 vuzx = lexEsc11 vuzx; " "lexEsc15 c s True = (c : [],s) : []; lexEsc15 c s False = lexEsc14 (c : s); " "lexEsc16 (c : s) = lexEsc15 c s (c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : []); lexEsc16 vuzz = lexEsc14 vuzz; " The following Function with conditions "lexLitChar [] = []; lexLitChar (c : s)|c /= '\'(c : [],s) : []|otherwisemap (prefix '\') (lexEsc s) where { lexEsc (c : s)|c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : [](c : [],s) : []; lexEsc ('^' : c : s)|c >= '@' && c <= '_'('^' : c : [],s) : []; lexEsc ('o' : s) = prefix 'o' (span isOctDigit s) : []; lexEsc ('x' : s) = prefix 'x' (span isHexDigit s) : []; lexEsc (wuu : wuv)|isDigit wuuspan isDigit (wuu : wuv) : []|isUpper wuulexEsc2 (concatMap (lexEsc1 (wuu : wuv)) table); lexEsc wuw = []; ; lexEsc0 mne vu69 = lexEsc00 mne vu69; ; lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne wuy = []; ; lexEsc1 s vu70 = lexEsc10 s vu70; ; lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s wuz = []; ; lexEsc2 (pr : wux) = pr : []; lexEsc2 [] = []; ; prefix c (t,s) = (c : t,s); ; table = ('\127','D' : 'E' : 'L' : []) : asciiTab; } ; " is transformed to "lexLitChar [] = lexLitChar3 []; lexLitChar (c : s) = lexLitChar2 (c : s); " "lexLitChar2 (c : s) = lexLitChar1 c s (c /= '\') where { lexEsc (c : s) = lexEsc16 (c : s); lexEsc (vuyx : vuzu) = lexEsc14 (vuyx : vuzu); lexEsc (vuxy : s) = lexEsc11 (vuxy : s); lexEsc (vuwz : s) = lexEsc8 (vuwz : s); lexEsc (wuu : wuv) = lexEsc6 (wuu : wuv); lexEsc wuw = lexEsc3 wuw; ; lexEsc0 mne vu69 = lexEsc00 mne vu69; ; lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne wuy = []; ; lexEsc1 s vu70 = lexEsc10 s vu70; ; lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s wuz = []; ; lexEsc11 (vuxy : s) = lexEsc9 (vuxy == 'o') (vuxy : s); lexEsc11 vuyv = lexEsc8 vuyv; ; lexEsc12 vuyx c s True = ('^' : c : [],s) : []; lexEsc12 vuyx c s False = lexEsc11 (vuyx : c : s); ; lexEsc13 True (vuyx : c : s) = lexEsc12 vuyx c s (c >= '@' && c <= '_'); lexEsc13 vuzv vuzw = lexEsc11 vuzw; ; lexEsc14 (vuyx : vuzu) = lexEsc13 (vuyx == '^') (vuyx : vuzu); lexEsc14 vuzx = lexEsc11 vuzx; ; lexEsc15 c s True = (c : [],s) : []; lexEsc15 c s False = lexEsc14 (c : s); ; lexEsc16 (c : s) = lexEsc15 c s (c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : []); lexEsc16 vuzz = lexEsc14 vuzz; ; lexEsc2 (pr : wux) = pr : []; lexEsc2 [] = []; ; lexEsc3 wuw = []; ; lexEsc4 wuu wuv True = lexEsc2 (concatMap (lexEsc1 (wuu : wuv)) table); lexEsc4 wuu wuv False = lexEsc3 (wuu : wuv); ; lexEsc5 wuu wuv True = span isDigit (wuu : wuv) : []; lexEsc5 wuu wuv False = lexEsc4 wuu wuv (isUpper wuu); ; lexEsc6 (wuu : wuv) = lexEsc5 wuu wuv (isDigit wuu); lexEsc6 vuwx = lexEsc3 vuwx; ; lexEsc7 True (vuwz : s) = prefix 'x' (span isHexDigit s) : []; lexEsc7 vuxu vuxv = lexEsc6 vuxv; ; lexEsc8 (vuwz : s) = lexEsc7 (vuwz == 'x') (vuwz : s); lexEsc8 vuxw = lexEsc6 vuxw; ; lexEsc9 True (vuxy : s) = prefix 'o' (span isOctDigit s) : []; lexEsc9 vuxz vuyu = lexEsc8 vuyu; ; lexLitChar0 c s True = map (prefix '\') (lexEsc s); ; lexLitChar1 c s True = (c : [],s) : []; lexLitChar1 c s False = lexLitChar0 c s otherwise; ; prefix c (t,s) = (c : t,s); ; table = ('\127','D' : 'E' : 'L' : []) : asciiTab; } ; " "lexLitChar3 [] = []; lexLitChar3 vvuw = lexLitChar2 vvuw; " ---------------------------------------- (10) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (11) LetRed (EQUIVALENT) Let/Where Reductions: The bindings of the following Let/Where expression "readParen False readList2 where { readList0 vu13 = readList00 vu13; ; readList00 pr = pr : []; readList00 wv = []; ; readList1 vu14 = readList10 vu14; ; readList10 (wwx : wwy,s) = readList102 (wwx : wwy,s); readList10 vx = readList100 vx; ; readList100 vx = []; ; readList101 True (wwx : [],s) = concatMap readList0 (readl s); readList101 wwz wxu = readList100 wxu; ; readList102 (wwx : wwy,s) = readList101 (wwx == '[') (wwx : wwy,s); readList102 wxv = readList100 wxv; ; readList2 r = concatMap readList1 (lex r); ; readl s = concatMap readl0 (lex s) ++ concatMap readl2 (reads s); ; readl' s = concatMap readl'0 (lex s) ++ concatMap readl'3 (lex s); ; readl'0 vu18 = readl'00 vu18; ; readl'00 (wvw : wvx,t) = readl'002 (wvw : wvx,t); readl'00 vw = readl'000 vw; ; readl'000 vw = []; ; readl'001 True (wvw : [],t) = ([],t) : []; readl'001 wvy wvz = readl'000 wvz; ; readl'002 (wvw : wvx,t) = readl'001 (wvw == ']') (wvw : wvx,t); readl'002 wwu = readl'000 wwu; ; readl'1 x vu19 = readl'10 x vu19; ; readl'10 x (xs,v) = (x : xs,v) : []; readl'10 x vv = []; ; readl'2 vu20 = readl'20 vu20; ; readl'20 (x,u) = concatMap (readl'1 x) (readl' u); readl'20 wx = []; ; readl'3 vu21 = readl'30 vu21; ; readl'30 (wyz : wzu,t) = readl'302 (wyz : wzu,t); readl'30 ww = readl'300 ww; ; readl'300 ww = []; ; readl'301 True (wyz : [],t) = concatMap readl'2 (reads t); readl'301 wzv wzw = readl'300 wzw; ; readl'302 (wyz : wzu,t) = readl'301 (wyz == ',') (wyz : wzu,t); readl'302 wzx = readl'300 wzx; ; readl0 vu15 = readl00 vu15; ; readl00 (wxy : wxz,t) = readl002 (wxy : wxz,t); readl00 wu = readl000 wu; ; readl000 wu = []; ; readl001 True (wxy : [],t) = ([],t) : []; readl001 wyu wyv = readl000 wyv; ; readl002 (wxy : wxz,t) = readl001 (wxy == ']') (wxy : wxz,t); readl002 wyw = readl000 wyw; ; readl1 x vu16 = readl10 x vu16; ; readl10 x (xs,u) = (x : xs,u) : []; readl10 x vy = []; ; readl2 vu17 = readl20 vu17; ; readl20 (x,t) = concatMap (readl1 x) (readl' t); readl20 vz = []; } " are unpacked to the following functions on top level "readListReadl'001 True (wvw : [],t) = ([],t) : []; readListReadl'001 wvy wvz = readListReadl'000 wvz; " "readListReadl000 wu = []; " "readListReadList100 vx = []; " "readListReadl'3 vu21 = readListReadl'30 vu21; " "readListReadl20 (x,t) = concatMap (readListReadl1 x) (readListReadl' t); readListReadl20 vz = []; " "readListReadList0 vu13 = readListReadList00 vu13; " "readListReadl'301 True (wyz : [],t) = concatMap readListReadl'2 (reads t); readListReadl'301 wzv wzw = readListReadl'300 wzw; " "readListReadList101 True (wwx : [],s) = concatMap readListReadList0 (readListReadl s); readListReadList101 wwz wxu = readListReadList100 wxu; " "readListReadList00 pr = pr : []; readListReadList00 wv = []; " "readListReadl'30 (wyz : wzu,t) = readListReadl'302 (wyz : wzu,t); readListReadl'30 ww = readListReadl'300 ww; " "readListReadl'2 vu20 = readListReadl'20 vu20; " "readListReadl00 (wxy : wxz,t) = readListReadl002 (wxy : wxz,t); readListReadl00 wu = readListReadl000 wu; " "readListReadl'0 vu18 = readListReadl'00 vu18; " "readListReadl' s = concatMap readListReadl'0 (lex s) ++ concatMap readListReadl'3 (lex s); " "readListReadl'300 ww = []; " "readListReadl001 True (wxy : [],t) = ([],t) : []; readListReadl001 wyu wyv = readListReadl000 wyv; " "readListReadList2 r = concatMap readListReadList1 (lex r); " "readListReadl'20 (x,u) = concatMap (readListReadl'1 x) (readListReadl' u); readListReadl'20 wx = []; " "readListReadList1 vu14 = readListReadList10 vu14; " "readListReadl1 x vu16 = readListReadl10 x vu16; " "readListReadl s = concatMap readListReadl0 (lex s) ++ concatMap readListReadl2 (reads s); " "readListReadl'00 (wvw : wvx,t) = readListReadl'002 (wvw : wvx,t); readListReadl'00 vw = readListReadl'000 vw; " "readListReadList102 (wwx : wwy,s) = readListReadList101 (wwx == '[') (wwx : wwy,s); readListReadList102 wxv = readListReadList100 wxv; " "readListReadl002 (wxy : wxz,t) = readListReadl001 (wxy == ']') (wxy : wxz,t); readListReadl002 wyw = readListReadl000 wyw; " "readListReadl10 x (xs,u) = (x : xs,u) : []; readListReadl10 x vy = []; " "readListReadl'002 (wvw : wvx,t) = readListReadl'001 (wvw == ']') (wvw : wvx,t); readListReadl'002 wwu = readListReadl'000 wwu; " "readListReadl'302 (wyz : wzu,t) = readListReadl'301 (wyz == ',') (wyz : wzu,t); readListReadl'302 wzx = readListReadl'300 wzx; " "readListReadl'000 vw = []; " "readListReadl0 vu15 = readListReadl00 vu15; " "readListReadl2 vu17 = readListReadl20 vu17; " "readListReadList10 (wwx : wwy,s) = readListReadList102 (wwx : wwy,s); readListReadList10 vx = readListReadList100 vx; " "readListReadl'10 x (xs,v) = (x : xs,v) : []; readListReadl'10 x vv = []; " "readListReadl'1 x vu19 = readListReadl'10 x vu19; " The bindings of the following Let/Where expression "gcd' (abs x) (abs y) where { gcd' x xuw = gcd'2 x xuw; gcd' x y = gcd'0 x y; ; gcd'0 x y = gcd' y (x `rem` y); ; gcd'1 True x xuw = x; gcd'1 xux xuy xuz = gcd'0 xuy xuz; ; gcd'2 x xuw = gcd'1 (xuw == 0) x xuw; gcd'2 xvu xvv = gcd'0 xvu xvv; } " are unpacked to the following functions on top level "gcd0Gcd'0 x y = gcd0Gcd' y (x `rem` y); " "gcd0Gcd'2 x xuw = gcd0Gcd'1 (xuw == 0) x xuw; gcd0Gcd'2 xvu xvv = gcd0Gcd'0 xvu xvv; " "gcd0Gcd'1 True x xuw = x; gcd0Gcd'1 xux xuy xuz = gcd0Gcd'0 xuy xuz; " "gcd0Gcd' x xuw = gcd0Gcd'2 x xuw; gcd0Gcd' x y = gcd0Gcd'0 x y; " The bindings of the following Let/Where expression "reduce1 x y (y == 0) where { d = gcd x y; ; reduce0 x y True = x `quot` d :% (y `quot` d); ; reduce1 x y True = error []; reduce1 x y False = reduce0 x y otherwise; } " are unpacked to the following functions on top level "reduce2D vvux vvuy = gcd vvux vvuy; " "reduce2Reduce1 vvux vvuy x y True = error []; reduce2Reduce1 vvux vvuy x y False = reduce2Reduce0 vvux vvuy x y otherwise; " "reduce2Reduce0 vvux vvuy x y True = x `quot` reduce2D vvux vvuy :% (y `quot` reduce2D vvux vvuy); " The bindings of the following Let/Where expression "lexLitChar1 c s (c /= '\') where { lexEsc (c : s) = lexEsc16 (c : s); lexEsc (vuyx : vuzu) = lexEsc14 (vuyx : vuzu); lexEsc (vuxy : s) = lexEsc11 (vuxy : s); lexEsc (vuwz : s) = lexEsc8 (vuwz : s); lexEsc (wuu : wuv) = lexEsc6 (wuu : wuv); lexEsc wuw = lexEsc3 wuw; ; lexEsc0 mne vu69 = lexEsc00 mne vu69; ; lexEsc00 mne ([],s') = (mne,s') : []; lexEsc00 mne wuy = []; ; lexEsc1 s vu70 = lexEsc10 s vu70; ; lexEsc10 s (c,mne) = concatMap (lexEsc0 mne) (lexmatch mne s : []); lexEsc10 s wuz = []; ; lexEsc11 (vuxy : s) = lexEsc9 (vuxy == 'o') (vuxy : s); lexEsc11 vuyv = lexEsc8 vuyv; ; lexEsc12 vuyx c s True = ('^' : c : [],s) : []; lexEsc12 vuyx c s False = lexEsc11 (vuyx : c : s); ; lexEsc13 True (vuyx : c : s) = lexEsc12 vuyx c s (c >= '@' && c <= '_'); lexEsc13 vuzv vuzw = lexEsc11 vuzw; ; lexEsc14 (vuyx : vuzu) = lexEsc13 (vuyx == '^') (vuyx : vuzu); lexEsc14 vuzx = lexEsc11 vuzx; ; lexEsc15 c s True = (c : [],s) : []; lexEsc15 c s False = lexEsc14 (c : s); ; lexEsc16 (c : s) = lexEsc15 c s (c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : []); lexEsc16 vuzz = lexEsc14 vuzz; ; lexEsc2 (pr : wux) = pr : []; lexEsc2 [] = []; ; lexEsc3 wuw = []; ; lexEsc4 wuu wuv True = lexEsc2 (concatMap (lexEsc1 (wuu : wuv)) table); lexEsc4 wuu wuv False = lexEsc3 (wuu : wuv); ; lexEsc5 wuu wuv True = span isDigit (wuu : wuv) : []; lexEsc5 wuu wuv False = lexEsc4 wuu wuv (isUpper wuu); ; lexEsc6 (wuu : wuv) = lexEsc5 wuu wuv (isDigit wuu); lexEsc6 vuwx = lexEsc3 vuwx; ; lexEsc7 True (vuwz : s) = prefix 'x' (span isHexDigit s) : []; lexEsc7 vuxu vuxv = lexEsc6 vuxv; ; lexEsc8 (vuwz : s) = lexEsc7 (vuwz == 'x') (vuwz : s); lexEsc8 vuxw = lexEsc6 vuxw; ; lexEsc9 True (vuxy : s) = prefix 'o' (span isOctDigit s) : []; lexEsc9 vuxz vuyu = lexEsc8 vuyu; ; lexLitChar0 c s True = map (prefix '\') (lexEsc s); ; lexLitChar1 c s True = (c : [],s) : []; lexLitChar1 c s False = lexLitChar0 c s otherwise; ; prefix c (t,s) = (c : t,s); ; table = ('\127','D' : 'E' : 'L' : []) : asciiTab; } " are unpacked to the following functions on top level "lexLitChar2LexEsc (c : s) = lexLitChar2LexEsc16 (c : s); lexLitChar2LexEsc (vuyx : vuzu) = lexLitChar2LexEsc14 (vuyx : vuzu); lexLitChar2LexEsc (vuxy : s) = lexLitChar2LexEsc11 (vuxy : s); lexLitChar2LexEsc (vuwz : s) = lexLitChar2LexEsc8 (vuwz : s); lexLitChar2LexEsc (wuu : wuv) = lexLitChar2LexEsc6 (wuu : wuv); lexLitChar2LexEsc wuw = lexLitChar2LexEsc3 wuw; " "lexLitChar2LexEsc15 c s True = (c : [],s) : []; lexLitChar2LexEsc15 c s False = lexLitChar2LexEsc14 (c : s); " "lexLitChar2LexLitChar0 c s True = map (lexLitChar2Prefix '\') (lexLitChar2LexEsc s); " "lexLitChar2LexEsc4 wuu wuv True = lexLitChar2LexEsc2 (concatMap (lexLitChar2LexEsc1 (wuu : wuv)) lexLitChar2Table); lexLitChar2LexEsc4 wuu wuv False = lexLitChar2LexEsc3 (wuu : wuv); " "lexLitChar2LexEsc3 wuw = []; " "lexLitChar2LexEsc9 True (vuxy : s) = lexLitChar2Prefix 'o' (span isOctDigit s) : []; lexLitChar2LexEsc9 vuxz vuyu = lexLitChar2LexEsc8 vuyu; " "lexLitChar2LexEsc16 (c : s) = lexLitChar2LexEsc15 c s (c `elem` 'a' : 'b' : 'f' : 'n' : 'r' : 't' : 'v' : '\' : '"' : ''' : []); lexLitChar2LexEsc16 vuzz = lexLitChar2LexEsc14 vuzz; " "lexLitChar2Prefix c (t,s) = (c : t,s); " "lexLitChar2LexEsc11 (vuxy : s) = lexLitChar2LexEsc9 (vuxy == 'o') (vuxy : s); lexLitChar2LexEsc11 vuyv = lexLitChar2LexEsc8 vuyv; " "lexLitChar2LexEsc0 mne vu69 = lexLitChar2LexEsc00 mne vu69; " "lexLitChar2LexEsc10 s (c,mne) = concatMap (lexLitChar2LexEsc0 mne) (lexmatch mne s : []); lexLitChar2LexEsc10 s wuz = []; " "lexLitChar2LexEsc6 (wuu : wuv) = lexLitChar2LexEsc5 wuu wuv (isDigit wuu); lexLitChar2LexEsc6 vuwx = lexLitChar2LexEsc3 vuwx; " "lexLitChar2LexEsc8 (vuwz : s) = lexLitChar2LexEsc7 (vuwz == 'x') (vuwz : s); lexLitChar2LexEsc8 vuxw = lexLitChar2LexEsc6 vuxw; " "lexLitChar2Table = ('\127','D' : 'E' : 'L' : []) : asciiTab; " "lexLitChar2LexEsc7 True (vuwz : s) = lexLitChar2Prefix 'x' (span isHexDigit s) : []; lexLitChar2LexEsc7 vuxu vuxv = lexLitChar2LexEsc6 vuxv; " "lexLitChar2LexEsc12 vuyx c s True = ('^' : c : [],s) : []; lexLitChar2LexEsc12 vuyx c s False = lexLitChar2LexEsc11 (vuyx : c : s); " "lexLitChar2LexEsc1 s vu70 = lexLitChar2LexEsc10 s vu70; " "lexLitChar2LexEsc00 mne ([],s') = (mne,s') : []; lexLitChar2LexEsc00 mne wuy = []; " "lexLitChar2LexEsc14 (vuyx : vuzu) = lexLitChar2LexEsc13 (vuyx == '^') (vuyx : vuzu); lexLitChar2LexEsc14 vuzx = lexLitChar2LexEsc11 vuzx; " "lexLitChar2LexEsc13 True (vuyx : c : s) = lexLitChar2LexEsc12 vuyx c s (c >= '@' && c <= '_'); lexLitChar2LexEsc13 vuzv vuzw = lexLitChar2LexEsc11 vuzw; " "lexLitChar2LexEsc5 wuu wuv True = span isDigit (wuu : wuv) : []; lexLitChar2LexEsc5 wuu wuv False = lexLitChar2LexEsc4 wuu wuv (isUpper wuu); " "lexLitChar2LexEsc2 (pr : wux) = pr : []; lexLitChar2LexEsc2 [] = []; " "lexLitChar2LexLitChar1 c s True = (c : [],s) : []; lexLitChar2LexLitChar1 c s False = lexLitChar2LexLitChar0 c s otherwise; " The bindings of the following Let/Where expression "concatMap lex1 (lexString s) where { lex1 vu55 = lex10 vu55; ; lex10 (str,t) = ('"' : str,t) : []; lex10 yz = []; ; lexStrItem (xzw : yuu) = lexStrItem7 (xzw : yuu); lexStrItem (xyu : xyx) = lexStrItem4 (xyu : xyx); lexStrItem s = lexStrItem1 s; ; lexStrItem0 vu58 = lexStrItem00 vu58; ; lexStrItem00 (yvv : t) = lexStrItem002 (yvv : t); lexStrItem00 yy = lexStrItem000 yy; ; lexStrItem000 yy = []; ; lexStrItem001 True (yvv : t) = ([],t) : []; lexStrItem001 yvw yvx = lexStrItem000 yvx; ; lexStrItem002 (yvv : t) = lexStrItem001 (yvv == '\') (yvv : t); lexStrItem002 yvy = lexStrItem000 yvy; ; lexStrItem1 s = lexLitChar s; ; lexStrItem2 xyu c s True = concatMap lexStrItem0 (dropWhile isSpace s : []); lexStrItem2 xyu c s False = lexStrItem1 (xyu : c : s); ; lexStrItem3 True (xyu : c : s) = lexStrItem2 xyu c s (isSpace c); lexStrItem3 xyy xyz = lexStrItem1 xyz; ; lexStrItem4 (xyu : xyx) = lexStrItem3 (xyu == '\') (xyu : xyx); lexStrItem4 xzu = lexStrItem1 xzu; ; lexStrItem5 True (xzw : xzy : s) = ('\' : '&' : [],s) : []; lexStrItem5 yuv yuw = lexStrItem4 yuw; ; lexStrItem6 True (xzw : xzy : s) = lexStrItem5 (xzy == '&') (xzw : xzy : s); lexStrItem6 yux yuy = lexStrItem4 yuy; ; lexStrItem7 (xzw : yuu) = lexStrItem6 (xzw == '\') (xzw : yuu); lexStrItem7 yuz = lexStrItem4 yuz; ; lexString (xxv : s) = lexString4 (xxv : s); lexString s = lexString2 s; ; lexString0 ch vu56 = lexString00 ch vu56; ; lexString00 ch (str,u) = (ch ++ str,u) : []; lexString00 ch yw = []; ; lexString1 vu57 = lexString10 vu57; ; lexString10 (ch,t) = concatMap (lexString0 ch) (lexString t); lexString10 yx = []; ; lexString2 s = concatMap lexString1 (lexStrItem s); ; lexString3 True (xxv : s) = ('"' : [],s) : []; lexString3 xxw xxx = lexString2 xxx; ; lexString4 (xxv : s) = lexString3 (xxv == '"') (xxv : s); lexString4 xxy = lexString2 xxy; } " are unpacked to the following functions on top level "lex13LexString10 (ch,t) = concatMap (lex13LexString0 ch) (lex13LexString t); lex13LexString10 yx = []; " "lex13LexStrItem0 vu58 = lex13LexStrItem00 vu58; " "lex13LexStrItem2 xyu c s True = concatMap lex13LexStrItem0 (dropWhile isSpace s : []); lex13LexStrItem2 xyu c s False = lex13LexStrItem1 (xyu : c : s); " "lex13LexString1 vu57 = lex13LexString10 vu57; " "lex13LexStrItem3 True (xyu : c : s) = lex13LexStrItem2 xyu c s (isSpace c); lex13LexStrItem3 xyy xyz = lex13LexStrItem1 xyz; " "lex13LexStrItem000 yy = []; " "lex13Lex10 (str,t) = ('"' : str,t) : []; lex13Lex10 yz = []; " "lex13LexStrItem00 (yvv : t) = lex13LexStrItem002 (yvv : t); lex13LexStrItem00 yy = lex13LexStrItem000 yy; " "lex13LexStrItem (xzw : yuu) = lex13LexStrItem7 (xzw : yuu); lex13LexStrItem (xyu : xyx) = lex13LexStrItem4 (xyu : xyx); lex13LexStrItem s = lex13LexStrItem1 s; " "lex13LexString2 s = concatMap lex13LexString1 (lex13LexStrItem s); " "lex13LexStrItem1 s = lexLitChar s; " "lex13LexString00 ch (str,u) = (ch ++ str,u) : []; lex13LexString00 ch yw = []; " "lex13LexStrItem002 (yvv : t) = lex13LexStrItem001 (yvv == '\') (yvv : t); lex13LexStrItem002 yvy = lex13LexStrItem000 yvy; " "lex13Lex1 vu55 = lex13Lex10 vu55; " "lex13LexString3 True (xxv : s) = ('"' : [],s) : []; lex13LexString3 xxw xxx = lex13LexString2 xxx; " "lex13LexStrItem7 (xzw : yuu) = lex13LexStrItem6 (xzw == '\') (xzw : yuu); lex13LexStrItem7 yuz = lex13LexStrItem4 yuz; " "lex13LexString4 (xxv : s) = lex13LexString3 (xxv == '"') (xxv : s); lex13LexString4 xxy = lex13LexString2 xxy; " "lex13LexStrItem001 True (yvv : t) = ([],t) : []; lex13LexStrItem001 yvw yvx = lex13LexStrItem000 yvx; " "lex13LexString0 ch vu56 = lex13LexString00 ch vu56; " "lex13LexString (xxv : s) = lex13LexString4 (xxv : s); lex13LexString s = lex13LexString2 s; " "lex13LexStrItem4 (xyu : xyx) = lex13LexStrItem3 (xyu == '\') (xyu : xyx); lex13LexStrItem4 xzu = lex13LexStrItem1 xzu; " "lex13LexStrItem5 True (xzw : xzy : s) = ('\' : '&' : [],s) : []; lex13LexStrItem5 yuv yuw = lex13LexStrItem4 yuw; " "lex13LexStrItem6 True (xzw : xzy : s) = lex13LexStrItem5 (xzy == '&') (xzw : xzy : s); lex13LexStrItem6 yux yuy = lex13LexStrItem4 yuy; " The bindings of the following Let/Where expression "span1 p vwv vww (p vwv) where { span0 p vwv vww True = ([],vwv : vww); ; span1 p vwv vww True = (vwv : ys,zs); span1 p vwv vww False = span0 p vwv vww otherwise; ; vu43 = span p vww; ; ys = ys0 vu43; ; ys0 (ys,vwy) = ys; ; zs = zs0 vu43; ; zs0 (vwx,zs) = zs; } " are unpacked to the following functions on top level "span2Zs vvuz vvvu = span2Zs0 vvuz vvvu (span2Vu43 vvuz vvvu); " "span2Span1 vvuz vvvu p vwv vww True = (vwv : span2Ys vvuz vvvu,span2Zs vvuz vvvu); span2Span1 vvuz vvvu p vwv vww False = span2Span0 vvuz vvvu p vwv vww otherwise; " "span2Ys vvuz vvvu = span2Ys0 vvuz vvvu (span2Vu43 vvuz vvvu); " "span2Span0 vvuz vvvu p vwv vww True = ([],vwv : vww); " "span2Vu43 vvuz vvvu = span vvuz vvvu; " "span2Zs0 vvuz vvvu (vwx,zs) = zs; " "span2Ys0 vvuz vvvu (ys,vwy) = ys; " The bindings of the following Let/Where expression "lex11 c s (isSingle c) where { isIdChar c = isAlphaNum c || c `elem` '_' : ''' : []; ; isSingle c = c `elem` ',' : ';' : '(' : ')' : '[' : ']' : '{' : '}' : '_' : '`' : []; ; isSym c = c `elem` '!' : '@' : '#' : '$' : '%' : '&' : '*' : '+' : '.' : '/' : '<' : '=' : '>' : '?' : '\' : '^' : '|' : ':' : '-' : '~' : []; ; lex11 c s True = (c : [],s) : []; lex11 c s False = lex9 c s (isSym c); ; lex2 c vu59 = lex20 c vu59; ; lex20 c (sym,t) = (c : sym,t) : []; lex20 c vuv = []; ; lex3 c vu60 = lex30 c vu60; ; lex30 c (nam,t) = (c : nam,t) : []; lex30 c vuw = []; ; lex4 c ds vu61 = lex40 c ds vu61; ; lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex40 c ds zz = []; ; lex5 c vu62 = lex50 c vu62; ; lex50 c (ds,s) = concatMap (lex4 c ds) (lexFracExp s); lex50 c vuu = []; ; lex6 c s True = []; ; lex7 c s True = concatMap (lex5 c) (span isDigit s : []); lex7 c s False = lex6 c s otherwise; ; lex8 c s True = concatMap (lex3 c) (span isIdChar s : []); lex8 c s False = lex7 c s (isDigit c); ; lex9 c s True = concatMap (lex2 c) (span isSym s : []); lex9 c s False = lex8 c s (isAlpha c); ; lexExp (e : s) = lexExp5 (e : s); lexExp s = lexExp3 s; ; lexExp0 e c vu65 = lexExp00 e c vu65; ; lexExp00 e c (ds,u) = (e : c : ds,u) : []; lexExp00 e c zu = []; ; lexExp1 e vu66 = lexExp10 e vu66; ; lexExp10 e (c : t) = lexExp100 e c t (c `elem` '+' : '-' : []); lexExp10 e zw = []; ; lexExp100 e c t True = concatMap (lexExp0 e c) (lexDigits t); lexExp100 e c t False = []; ; lexExp2 e vu67 = lexExp20 e vu67; ; lexExp20 e (ds,t) = (e : ds,t) : []; lexExp20 e zv = []; ; lexExp3 s = ([],s) : []; ; lexExp4 e s True = concatMap (lexExp1 e) (s : []) ++ concatMap (lexExp2 e) (lexDigits s); lexExp4 e s False = lexExp3 (e : s); ; lexExp5 (e : s) = lexExp4 e s (e `elem` 'e' : 'E' : []); lexExp5 ywu = lexExp3 ywu; ; lexFracExp (yww : ywz) = lexFracExp5 (yww : ywz); lexFracExp s = lexFracExp2 s; ; lexFracExp0 ds vu63 = lexFracExp00 ds vu63; ; lexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lexFracExp00 ds zy = []; ; lexFracExp1 vu64 = lexFracExp10 vu64; ; lexFracExp10 (ds,t) = concatMap (lexFracExp0 ds) (lexExp t); lexFracExp10 zx = []; ; lexFracExp2 s = lexExp s; ; lexFracExp3 yww c cs True = concatMap lexFracExp1 (lexDigits (c : cs)); lexFracExp3 yww c cs False = lexFracExp2 (yww : c : cs); ; lexFracExp4 True (yww : c : cs) = lexFracExp3 yww c cs (isDigit c); lexFracExp4 yxu yxv = lexFracExp2 yxv; ; lexFracExp5 (yww : ywz) = lexFracExp4 (yww == '.') (yww : ywz); lexFracExp5 yxw = lexFracExp2 yxw; } " are unpacked to the following functions on top level "lex12Lex30 c (nam,t) = (c : nam,t) : []; lex12Lex30 c vuw = []; " "lex12LexFracExp0 ds vu63 = lex12LexFracExp00 ds vu63; " "lex12IsSingle c = c `elem` ',' : ';' : '(' : ')' : '[' : ']' : '{' : '}' : '_' : '`' : []; " "lex12Lex20 c (sym,t) = (c : sym,t) : []; lex12Lex20 c vuv = []; " "lex12LexFracExp2 s = lex12LexExp s; " "lex12LexExp4 e s True = concatMap (lex12LexExp1 e) (s : []) ++ concatMap (lex12LexExp2 e) (lexDigits s); lex12LexExp4 e s False = lex12LexExp3 (e : s); " "lex12LexFracExp (yww : ywz) = lex12LexFracExp5 (yww : ywz); lex12LexFracExp s = lex12LexFracExp2 s; " "lex12Lex5 c vu62 = lex12Lex50 c vu62; " "lex12Lex11 c s True = (c : [],s) : []; lex12Lex11 c s False = lex12Lex9 c s (lex12IsSym c); " "lex12Lex40 c ds (fe,t) = (c : ds ++ fe,t) : []; lex12Lex40 c ds zz = []; " "lex12LexExp1 e vu66 = lex12LexExp10 e vu66; " "lex12LexExp20 e (ds,t) = (e : ds,t) : []; lex12LexExp20 e zv = []; " "lex12IsSym c = c `elem` '!' : '@' : '#' : '$' : '%' : '&' : '*' : '+' : '.' : '/' : '<' : '=' : '>' : '?' : '\' : '^' : '|' : ':' : '-' : '~' : []; " "lex12LexExp0 e c vu65 = lex12LexExp00 e c vu65; " "lex12LexExp10 e (c : t) = lex12LexExp100 e c t (c `elem` '+' : '-' : []); lex12LexExp10 e zw = []; " "lex12Lex4 c ds vu61 = lex12Lex40 c ds vu61; " "lex12IsIdChar c = isAlphaNum c || c `elem` '_' : ''' : []; " "lex12LexExp (e : s) = lex12LexExp5 (e : s); lex12LexExp s = lex12LexExp3 s; " "lex12LexExp5 (e : s) = lex12LexExp4 e s (e `elem` 'e' : 'E' : []); lex12LexExp5 ywu = lex12LexExp3 ywu; " "lex12LexExp3 s = ([],s) : []; " "lex12LexFracExp4 True (yww : c : cs) = lex12LexFracExp3 yww c cs (isDigit c); lex12LexFracExp4 yxu yxv = lex12LexFracExp2 yxv; " "lex12Lex3 c vu60 = lex12Lex30 c vu60; " "lex12Lex6 c s True = []; " "lex12Lex7 c s True = concatMap (lex12Lex5 c) (span isDigit s : []); lex12Lex7 c s False = lex12Lex6 c s otherwise; " "lex12LexFracExp1 vu64 = lex12LexFracExp10 vu64; " "lex12LexExp100 e c t True = concatMap (lex12LexExp0 e c) (lexDigits t); lex12LexExp100 e c t False = []; " "lex12LexExp00 e c (ds,u) = (e : c : ds,u) : []; lex12LexExp00 e c zu = []; " "lex12LexExp2 e vu67 = lex12LexExp20 e vu67; " "lex12Lex50 c (ds,s) = concatMap (lex12Lex4 c ds) (lex12LexFracExp s); lex12Lex50 c vuu = []; " "lex12Lex9 c s True = concatMap (lex12Lex2 c) (span lex12IsSym s : []); lex12Lex9 c s False = lex12Lex8 c s (isAlpha c); " "lex12LexFracExp00 ds (e,u) = ('.' : ds ++ e,u) : []; lex12LexFracExp00 ds zy = []; " "lex12Lex2 c vu59 = lex12Lex20 c vu59; " "lex12Lex8 c s True = concatMap (lex12Lex3 c) (span lex12IsIdChar s : []); lex12Lex8 c s False = lex12Lex7 c s (isDigit c); " "lex12LexFracExp10 (ds,t) = concatMap (lex12LexFracExp0 ds) (lex12LexExp t); lex12LexFracExp10 zx = []; " "lex12LexFracExp5 (yww : ywz) = lex12LexFracExp4 (yww == '.') (yww : ywz); lex12LexFracExp5 yxw = lex12LexFracExp2 yxw; " "lex12LexFracExp3 yww c cs True = concatMap lex12LexFracExp1 (lexDigits (c : cs)); lex12LexFracExp3 yww c cs False = lex12LexFracExp2 (yww : c : cs); " The bindings of the following Let/Where expression "readParen0 b where { mandatory r = concatMap mandatory2 (lex r); ; mandatory0 x vu48 = mandatory00 x vu48; ; mandatory00 x (vuuu : vuuv,u) = mandatory002 x (vuuu : vuuv,u); mandatory00 x vyz = mandatory000 x vyz; ; mandatory000 x vyz = []; ; mandatory001 True x (vuuu : [],u) = (x,u) : []; mandatory001 vuuw vuux vuuy = mandatory000 vuux vuuy; ; mandatory002 x (vuuu : vuuv,u) = mandatory001 (vuuu == ')') x (vuuu : vuuv,u); mandatory002 vuuz vuvu = mandatory000 vuuz vuvu; ; mandatory1 vu49 = mandatory10 vu49; ; mandatory10 (x,t) = concatMap (mandatory0 x) (lex t); mandatory10 vzu = []; ; mandatory2 vu50 = mandatory20 vu50; ; mandatory20 (zyz : zzu,s) = mandatory202 (zyz : zzu,s); mandatory20 vyy = mandatory200 vyy; ; mandatory200 vyy = []; ; mandatory201 True (zyz : [],s) = concatMap mandatory1 (optional s); mandatory201 zzv zzw = mandatory200 zzw; ; mandatory202 (zyz : zzu,s) = mandatory201 (zyz == '(') (zyz : zzu,s); mandatory202 zzx = mandatory200 zzx; ; optional r = g r ++ mandatory r; ; readParen0 True = mandatory; readParen0 False = optional; } " are unpacked to the following functions on top level "readParenMandatory0 vvvv x vu48 = readParenMandatory00 vvvv x vu48; " "readParenMandatory201 vvvv True (zyz : [],s) = concatMap (readParenMandatory1 vvvv) (readParenOptional vvvv s); readParenMandatory201 vvvv zzv zzw = readParenMandatory200 vvvv zzw; " "readParenMandatory002 vvvv x (vuuu : vuuv,u) = readParenMandatory001 vvvv (vuuu == ')') x (vuuu : vuuv,u); readParenMandatory002 vvvv vuuz vuvu = readParenMandatory000 vvvv vuuz vuvu; " "readParenReadParen0 vvvv True = readParenMandatory vvvv; readParenReadParen0 vvvv False = readParenOptional vvvv; " "readParenMandatory00 vvvv x (vuuu : vuuv,u) = readParenMandatory002 vvvv x (vuuu : vuuv,u); readParenMandatory00 vvvv x vyz = readParenMandatory000 vvvv x vyz; " "readParenMandatory001 vvvv True x (vuuu : [],u) = (x,u) : []; readParenMandatory001 vvvv vuuw vuux vuuy = readParenMandatory000 vvvv vuux vuuy; " "readParenMandatory20 vvvv (zyz : zzu,s) = readParenMandatory202 vvvv (zyz : zzu,s); readParenMandatory20 vvvv vyy = readParenMandatory200 vvvv vyy; " "readParenOptional vvvv r = vvvv r ++ readParenMandatory vvvv r; " "readParenMandatory000 vvvv x vyz = []; " "readParenMandatory202 vvvv (zyz : zzu,s) = readParenMandatory201 vvvv (zyz == '(') (zyz : zzu,s); readParenMandatory202 vvvv zzx = readParenMandatory200 vvvv zzx; " "readParenMandatory2 vvvv vu50 = readParenMandatory20 vvvv vu50; " "readParenMandatory200 vvvv vyy = []; " "readParenMandatory vvvv r = concatMap (readParenMandatory2 vvvv) (lex r); " "readParenMandatory1 vvvv vu49 = readParenMandatory10 vvvv vu49; " "readParenMandatory10 vvvv (x,t) = concatMap (readParenMandatory0 vvvv x) (lex t); readParenMandatory10 vvvv vzu = []; " The bindings of the following Let/Where expression "readParen False read' where { read' r = read'' r ++ concatMap read'1 (lex r); ; read'' r = concatMap (read''1 readPos) (lex r); ; read''0 s vu80 = read''00 s vu80; ; read''00 s (n,[]) = (n,s) : []; read''00 s vzw = []; ; read''1 readPos vu81 = read''10 readPos vu81; ; read''10 readPos (str,s) = concatMap (read''0 s) (readPos str); read''10 readPos vzv = []; ; read'0 vu78 = read'00 vu78; ; read'00 (x,t) = (`negate` x,t) : []; read'00 vzy = []; ; read'1 vu79 = read'10 vu79; ; read'10 (vuvx : vuvy,s) = read'102 (vuvx : vuvy,s); read'10 vzx = read'100 vzx; ; read'100 vzx = []; ; read'101 True (vuvx : [],s) = concatMap read'0 (read'' s); read'101 vuvz vuwu = read'100 vuwu; ; read'102 (vuvx : vuvy,s) = read'101 (vuvx == '-') (vuvx : vuvy,s); read'102 vuwv = read'100 vuwv; } " are unpacked to the following functions on top level "readSignedRead''0 vvvw s vu80 = readSignedRead''00 vvvw s vu80; " "readSignedRead' vvvw r = readSignedRead'' vvvw r ++ concatMap (readSignedRead'1 vvvw) (lex r); " "readSignedRead'0 vvvw vu78 = readSignedRead'00 vvvw vu78; " "readSignedRead''00 vvvw s (n,[]) = (n,s) : []; readSignedRead''00 vvvw s vzw = []; " "readSignedRead'10 vvvw (vuvx : vuvy,s) = readSignedRead'102 vvvw (vuvx : vuvy,s); readSignedRead'10 vvvw vzx = readSignedRead'100 vvvw vzx; " "readSignedRead'1 vvvw vu79 = readSignedRead'10 vvvw vu79; " "readSignedRead'' vvvw r = concatMap (readSignedRead''1 vvvw vvvw) (lex r); " "readSignedRead'100 vvvw vzx = []; " "readSignedRead''10 vvvw readPos (str,s) = concatMap (readSignedRead''0 vvvw s) (readPos str); readSignedRead''10 vvvw readPos vzv = []; " "readSignedRead'00 vvvw (x,t) = (`negate` x,t) : []; readSignedRead'00 vvvw vzy = []; " "readSignedRead''1 vvvw readPos vu81 = readSignedRead''10 vvvw readPos vu81; " "readSignedRead'101 vvvw True (vuvx : [],s) = concatMap (readSignedRead'0 vvvw) (readSignedRead'' vvvw s); readSignedRead'101 vvvw vuvz vuwu = readSignedRead'100 vvvw vuwu; " "readSignedRead'102 vvvw (vuvx : vuvy,s) = readSignedRead'101 vvvw (vuvx == '-') (vuvx : vuvy,s); readSignedRead'102 vvvw vuwv = readSignedRead'100 vvvw vuwv; " ---------------------------------------- (12) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (13) NumRed (SOUND) Num Reduction:All numbers are transformed to their corresponding representation with Succ, Pred and Zero. ---------------------------------------- (14) Obligation: mainModule Main module Main where { import qualified Prelude; }