From c6b38d25bf5e59c89d2d599179aa82a1167362be Mon Sep 17 00:00:00 2001 From: timmy Date: Tue, 20 Feb 2024 23:08:20 -0500 Subject: [PATCH] changed layout benches to print the blogs in a way that's independent of internal type names --- .../examples/layout_bench/Basics.hs | 2 + .../examples/layout_bench/manyFuncs.hs | 2 +- gibbon-compiler/ir.log | 5337 +---------------- gibbon-compiler/src/Gibbon/L1/Interp.hs | 10 +- 4 files changed, 14 insertions(+), 5337 deletions(-) diff --git a/gibbon-compiler/examples/layout_bench/Basics.hs b/gibbon-compiler/examples/layout_bench/Basics.hs index 6c5926bf8..aefd8179b 100644 --- a/gibbon-compiler/examples/layout_bench/Basics.hs +++ b/gibbon-compiler/examples/layout_bench/Basics.hs @@ -588,6 +588,8 @@ printID id = case id of printBlog :: Blog -> () printBlog blog = case blog of + End -> let _ = printsym (quote "Fin") + in () Layout1 header id author date content tags rst -> let _ = printsym (quote "Layout1 ") _ = printHeader header _ = printID id diff --git a/gibbon-compiler/examples/layout_bench/manyFuncs.hs b/gibbon-compiler/examples/layout_bench/manyFuncs.hs index 6e0527659..37b964542 100644 --- a/gibbon-compiler/examples/layout_bench/manyFuncs.hs +++ b/gibbon-compiler/examples/layout_bench/manyFuncs.hs @@ -47,4 +47,4 @@ gibbon_main = newblgs = emphKeywordInContent keyword blogs newblgs' = emphKeywordInTag keyword newblgs newblgs'' = filterByKeywordInTagList keyword newblgs' - in printPacked newblgs'' + in printBlog newblgs'' diff --git a/gibbon-compiler/ir.log b/gibbon-compiler/ir.log index db105efd3..53b20d9c2 100644 --- a/gibbon-compiler/ir.log +++ b/gibbon-compiler/ir.log @@ -1,5338 +1,5 @@ ! Responding to env Var: GIBBON_DEBUG=4 ! We set DEBUG based on command-line verbose arg: 4 - -Parsed: -================================================================================ -ProgBundle [ProgModule "GenerateLayout1" - (Prog - {ddefs = [], - fundefs = [(mkBlogs_layout1, - FunDef {funName = "mkBlogs_layout1", - funArgs = [length], - funTy = ForAll [] - (ArrowTy [IntTy] - (PackedTy "Blog" [])), - funBody = IfE (PrimAppE LtEqP - [VarE "length",LitE 0]) - (DataConE (MetaTv $1) "End" []) - (LetE (header, - [], - MetaTv $16, - DataConE (MetaTv $15) - "Header" - [AppE "getRandomString" - [] - [LitE 5]]) - (LetE (id, - [], - MetaTv $14, - DataConE (MetaTv $13) - "ID" - [PrimAppE SubP - [LitE 10, - PrimAppE ModP - [VarE "length", - LitE 10]]]) - (LetE (author, - [], - MetaTv $12, - DataConE (MetaTv $11) - "Author" - [AppE "getRandomString" - [] - [LitE 5]]) - (LetE (date, - [], - MetaTv $10, - DataConE (MetaTv $9) - "Date" - [AppE "getRandomString" - [] - [LitE 5]]) - (LetE (content, - [], - MetaTv $8, - DataConE (MetaTv $6) - "Content" - [DataConE (MetaTv $7) - "Plain" - [AppE "mkRandomInlineList" - [] - [LitE 50]]]) - (LetE (tags, - [], - MetaTv $5, - DataConE (MetaTv $4) - "TagList" - [AppE "mkSomeTags" - [] - [LitE 10]]) - (LetE (rst, - [], - MetaTv $3, - AppE "mkBlogs_layout1" - [] - [PrimAppE SubP - [VarE "length", - LitE 1]]) - (DataConE (MetaTv $2) - "Layout1" - [VarE "header", - VarE "id", - VarE "author", - VarE "date", - VarE "content", - VarE "tags", - VarE "rst"])))))))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}})], - mainExp = Nothing}) - [ImportDecl {importAnn = SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 3 1 3 14, srcInfoPoints = [SrcSpan ".hs" 3 1 3 7]}, importModule = ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 3 8 3 14, srcInfoPoints = []}) "Basics", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}], - ProgModule "Gibbon.Vector" - (Prog - {ddefs = [], - fundefs = [(generate, - FunDef {funName = "generate", - funArgs = [n,f], - funTy = ForAll [u:a] - (ArrowTy [IntTy, - ArrowTy [IntTy] - (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = LetE (n', - [], - MetaTv $91, - AppE "maxInt" [] [VarE "n",LitE 0]) - (LetE (vec, - [], - VectorTy (TyVar u:a), - PrimAppE (VAllocP (MetaTv $90)) - [VarE "n'"]) - (LetE (vec1, - [], - MetaTv $89, - AppE "generate_loop" - [] - [VarE "vec", - LitE 0,VarE "n'", - VarE "f"]) - (VarE "vec1"))), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (length, - FunDef {funName = "length", - funArgs = [vec], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a)] - IntTy), - funBody = PrimAppE (VLengthP (MetaTv $3)) - [VarE "vec"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (select, - FunDef {funName = "select", - funArgs = [v1,v2,i], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - VectorTy (TyVar u:a), - IntTy] - (TyVar u:a)), - funBody = LetE (len, - [], - MetaTv $102, - PrimAppE (VLengthP (MetaTv $101)) - [VarE "v1"]) - (IfE (PrimAppE LtP - [VarE "i", - VarE "len"]) - (PrimAppE (VNthP (MetaTv $99)) - [VarE "v1",VarE "i"]) - (PrimAppE (VNthP (MetaTv $100)) - [VarE "v2", - PrimAppE SubP - [VarE "i", - VarE "len"]])), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (nth, - FunDef {funName = "nth", - funArgs = [vec,i], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - IntTy] - (TyVar u:a)), - funBody = PrimAppE (VNthP (MetaTv $15)) - [VarE "vec",VarE "i"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (singleton, - FunDef {funName = "singleton", - funArgs = [x], - funTy = ForAll [u:a] - (ArrowTy [TyVar u:a] - (VectorTy (TyVar u:a))), - funBody = LetE (vec, - [], - VectorTy (TyVar u:a), - PrimAppE (VAllocP (MetaTv $55)) - [LitE 1]) - (LetE (vec2, - [], - MetaTv $54, - PrimAppE (InplaceVUpdateP (MetaTv $53)) - [VarE "vec",LitE 0, - VarE "x"]) - (VarE "vec2")), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (append, - FunDef {funName = "append", - funArgs = [v1,v2], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = AppE "generate" - [] - [PrimAppE AddP - [PrimAppE (VLengthP (MetaTv $105)) - [VarE "v1"], - PrimAppE (VLengthP (MetaTv $106)) - [VarE "v2"]], - Ext (LambdaE [(i, MetaTv $107)] - (AppE "select" - [] - [VarE "v1", - VarE "v2", - VarE "i"]))], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (head, - FunDef {funName = "head", - funArgs = [vec], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a)] - (TyVar u:a)), - funBody = AppE "nth" [] [VarE "vec",LitE 0], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printVec, - FunDef {funName = "printVec", - funArgs = [f,vec], - funTy = ForAll [u:a] - (ArrowTy [ArrowTy [TyVar u:a] - (ProdTy []), - VectorTy (TyVar u:a)] - (ProdTy [])), - funBody = LetE (wildcard_178, - [], - MetaTv $179, - PrimAppE PrintSym [LitSymE "["]) - (LetE (wildcard_176, - [], - MetaTv $177, - AppE "printVec_loop" - [] - [LitE 0, - PrimAppE (VLengthP (MetaTv $175)) - [VarE "vec"], - VarE "vec",VarE "f"]) - (LetE (wildcard_173, - [], - MetaTv $174, - PrimAppE PrintSym - [LitSymE "]"]) - (MkProdE []))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (alloc, - FunDef {funName = "alloc", - funArgs = [vec], - funTy = ForAll [u:a] - (ArrowTy [IntTy] - (VectorTy (TyVar u:a))), - funBody = PrimAppE (VAllocP (MetaTv $1)) - [VarE "vec"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (filter, - FunDef {funName = "filter", - funArgs = [f,vec], - funTy = ForAll [u:a] - (ArrowTy [ArrowTy [TyVar u:a] - BoolTy, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = LetE (idxs, - [], - VectorTy IntTy, - AppE "generate" - [] - [PrimAppE (VLengthP (MetaTv $231)) - [VarE "vec"], - Ext (LambdaE [(i, - MetaTv $232)] - (IfE (AppE "f" - [] - [AppE "nth" - [] - [VarE "vec", - VarE "i"]]) - (VarE "i") - (PrimAppE SubP - [LitE 0, - LitE 1])))]) - (LetE (num_ones, - [], - MetaTv $230, - AppE "foldl" - [] - [Ext (LambdaE [(acc, - IntTy), - (x, - IntTy)] - (IfE (PrimAppE EqIntP - [VarE "x", - PrimAppE SubP - [LitE 0, - LitE 1]]) - (VarE "acc") - (PrimAppE AddP - [VarE "acc", - LitE 1]))), - LitE 0,VarE "idxs"]) - (LetE (to, - [], - VectorTy (TyVar u:a), - PrimAppE (VAllocP (MetaTv $227)) - [VarE "num_ones"]) - (LetE (len_idxs, - [], - MetaTv $226, - PrimAppE (VLengthP (MetaTv $225)) - [VarE "idxs"]) - (AppE "filter_loop" - [] - [VarE "idxs", - LitE 0, - LitE 0, - VarE "len_idxs", - VarE "vec", - VarE "to"])))), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (filter_loop, - FunDef {funName = "filter_loop", - funArgs = [idxs,write_at,start,end,from,to], - funTy = ForAll [u:a] - (ArrowTy [VectorTy IntTy,IntTy, - IntTy,IntTy, - VectorTy (TyVar u:a), - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = IfE (PrimAppE EqIntP - [VarE "start",VarE "end"]) - (VarE "to") - (LetE (idx, - [], - MetaTv $222, - AppE "nth" - [] - [VarE "idxs", - VarE "start"]) - (IfE (PrimAppE EqIntP - [VarE "idx", - PrimAppE SubP - [LitE 0, - LitE 1]]) - (AppE "filter_loop" - [] - [VarE "idxs", - VarE "write_at", - PrimAppE AddP - [VarE "start", - LitE 1], - VarE "end", - VarE "from", - VarE "to"]) - (LetE (elt, - [], - MetaTv $221, - AppE "nth" - [] - [VarE "from", - VarE "idx"]) - (LetE (to1, - [], - MetaTv $220, - PrimAppE (InplaceVUpdateP (MetaTv $219)) - [VarE "to", - VarE "write_at", - VarE "elt"]) - (AppE "filter_loop" - [] - [VarE "idxs", - PrimAppE AddP - [VarE "write_at", - LitE 1], - PrimAppE AddP - [VarE "start", - LitE 1], - VarE "end", - VarE "from", - VarE "to1"]))))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (lcons, - FunDef {funName = "lcons", - funArgs = [x,vec], - funTy = ForAll [u:a] - (ArrowTy [TyVar u:a, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = LetE (y, [], MetaTv $212, VarE "vec") - (AppE "cons" - [] - [VarE "x",VarE "y"]), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (cons, - FunDef {funName = "cons", - funArgs = [x,vec], - funTy = ForAll [u:a] - (ArrowTy [TyVar u:a, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = LetE (len, - [], - MetaTv $209, - PrimAppE (VLengthP (MetaTv $208)) - [VarE "vec"]) - (LetE (vec2, - [], - VectorTy (TyVar u:a), - PrimAppE (VAllocP (MetaTv $207)) - [PrimAppE AddP - [VarE "len", - LitE 1]]) - (LetE (vec3, - [], - MetaTv $206, - AppE "generate_loop" - [] - [VarE "vec2", - LitE 1, - PrimAppE AddP - [VarE "len", - LitE 1], - Ext (LambdaE [(i, - MetaTv $205)] - (AppE "nth" - [] - [VarE "vec", - PrimAppE SubP - [VarE "i", - LitE 1]]))]) - (LetE (vec4, - [], - MetaTv $204, - PrimAppE (InplaceVUpdateP (MetaTv $203)) - [VarE "vec3", - LitE 0, - VarE "x"]) - (VarE "vec4")))), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (lsnoc, - FunDef {funName = "lsnoc", - funArgs = [vec,x], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - TyVar u:a] - (VectorTy (TyVar u:a))), - funBody = LetE (y, [], MetaTv $200, VarE "vec") - (AppE "snoc" - [] - [VarE "y",VarE "x"]), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (snoc, - FunDef {funName = "snoc", - funArgs = [vec,x], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - TyVar u:a] - (VectorTy (TyVar u:a))), - funBody = LetE (len, - [], - MetaTv $197, - PrimAppE (VLengthP (MetaTv $196)) - [VarE "vec"]) - (LetE (vec2, - [], - VectorTy (TyVar u:a), - PrimAppE (VAllocP (MetaTv $195)) - [PrimAppE AddP - [VarE "len", - LitE 1]]) - (LetE (vec3, - [], - MetaTv $194, - AppE "generate_loop" - [] - [VarE "vec2", - LitE 0, - VarE "len", - Ext (LambdaE [(i, - MetaTv $193)] - (AppE "nth" - [] - [VarE "vec", - VarE "i"]))]) - (LetE (vec4, - [], - MetaTv $192, - PrimAppE (InplaceVUpdateP (MetaTv $191)) - [VarE "vec3", - VarE "len", - VarE "x"]) - (VarE "vec4")))), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printVec_loop, - FunDef {funName = "printVec_loop", - funArgs = [idx,end,vec,f], - funTy = ForAll [u:a] - (ArrowTy [IntTy,IntTy, - VectorTy (TyVar u:a), - ArrowTy [TyVar u:a] - (ProdTy [])] - (ProdTy [])), - funBody = IfE (PrimAppE EqIntP - [VarE "idx",VarE "end"]) - (MkProdE []) - (LetE (wildcard_187, - [], - MetaTv $188, - AppE "f" - [] - [PrimAppE (VNthP (MetaTv $186)) - [VarE "vec", - VarE "idx"]]) - (LetE (wildcard_184, - [], - MetaTv $185, - PrimAppE PrintSym - [LitSymE ","]) - (AppE "printVec_loop" - [] - [PrimAppE AddP - [VarE "idx", - LitE 1], - VarE "end", - VarE "vec", - VarE "f"]))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (lifoldl, - FunDef {funName = "lifoldl", - funArgs = [f,acc,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [ArrowTy [TyVar u:b,IntTy, - TyVar u:a] - (TyVar u:b), - TyVar u:b, - VectorTy (TyVar u:a)] - (TyVar u:b)), - funBody = LetE (x, [], MetaTv $170, VarE "vec") - (AppE "ifoldl" - [] - [VarE "f",VarE "acc", - VarE "x"]), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (ifoldl_loop, - FunDef {funName = "ifoldl_loop", - funArgs = [idx,end,f,acc,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [IntTy,IntTy, - ArrowTy [TyVar u:b,IntTy, - TyVar u:a] - (TyVar u:b), - TyVar u:b, - VectorTy (TyVar u:a)] - (TyVar u:b)), - funBody = IfE (PrimAppE EqIntP - [VarE "idx",VarE "end"]) - (VarE "acc") - (LetE (acc1, - [], - MetaTv $166, - AppE "f" - [] - [VarE "acc",VarE "idx", - PrimAppE (VNthP (MetaTv $165)) - [VarE "vec", - VarE "idx"]]) - (AppE "ifoldl_loop" - [] - [PrimAppE AddP - [VarE "idx", - LitE 1], - VarE "end",VarE "f", - VarE "acc1", - VarE "vec"])), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (ifoldl, - FunDef {funName = "ifoldl", - funArgs = [f,acc,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [ArrowTy [TyVar u:b,IntTy, - TyVar u:a] - (TyVar u:b), - TyVar u:b, - VectorTy (TyVar u:a)] - (TyVar u:b)), - funBody = AppE "ifoldl_loop" - [] - [LitE 0, - PrimAppE (VLengthP (MetaTv $159)) - [VarE "vec"], - VarE "f",VarE "acc",VarE "vec"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (lscanl, - FunDef {funName = "lscanl", - funArgs = [f,acc,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [ArrowTy [TyVar u:b, - TyVar u:a] - (TyVar u:b), - TyVar u:b, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:b))), - funBody = LetE (x, [], MetaTv $155, VarE "vec") - (AppE "scanl" - [] - [VarE "f",VarE "acc", - VarE "x"]), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (scanl_loop, - FunDef {funName = "scanl_loop", - funArgs = [idx,end,f,acc,vec,result], - funTy = ForAll [u:a,u:b] - (ArrowTy [IntTy,IntTy, - ArrowTy [TyVar u:b, - TyVar u:a] - (TyVar u:b), - TyVar u:b, - VectorTy (TyVar u:a), - VectorTy (TyVar u:b)] - (VectorTy (TyVar u:b))), - funBody = IfE (PrimAppE EqIntP - [VarE "idx",VarE "end"]) - (VarE "result") - (LetE (acc1, - [], - MetaTv $151, - AppE "f" - [] - [VarE "acc", - PrimAppE (VNthP (MetaTv $150)) - [VarE "vec", - VarE "idx"]]) - (LetE (result', - [], - MetaTv $149, - PrimAppE (InplaceVUpdateP (MetaTv $148)) - [VarE "result", - VarE "idx", - VarE "acc1"]) - (AppE "scanl_loop" - [] - [PrimAppE AddP - [VarE "idx", - LitE 1], - VarE "end", - VarE "f", - VarE "acc1", - VarE "vec", - VarE "result'"]))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (scanl, - FunDef {funName = "scanl", - funArgs = [f,acc,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [ArrowTy [TyVar u:b, - TyVar u:a] - (TyVar u:b), - TyVar u:b, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:b))), - funBody = LetE (len, - [], - MetaTv $141, - PrimAppE (VLengthP (MetaTv $140)) - [VarE "vec"]) - (LetE (result, - [], - VectorTy (TyVar u:b), - PrimAppE (VAllocP (MetaTv $139)) - [VarE "len"]) - (AppE "scanl_loop" - [] - [LitE 0,VarE "len", - VarE "f",VarE "acc", - VarE "vec", - VarE "result"])), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (lfoldl, - FunDef {funName = "lfoldl", - funArgs = [f,acc,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [ArrowTy [TyVar u:b, - TyVar u:a] - (TyVar u:b), - TyVar u:b, - VectorTy (TyVar u:a)] - (TyVar u:b)), - funBody = LetE (x, [], MetaTv $135, VarE "vec") - (AppE "foldl" - [] - [VarE "f",VarE "acc", - VarE "x"]), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (foldl_loop, - FunDef {funName = "foldl_loop", - funArgs = [idx,end,f,acc,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [IntTy,IntTy, - ArrowTy [TyVar u:b, - TyVar u:a] - (TyVar u:b), - TyVar u:b, - VectorTy (TyVar u:a)] - (TyVar u:b)), - funBody = IfE (PrimAppE EqIntP - [VarE "idx",VarE "end"]) - (VarE "acc") - (LetE (acc1, - [], - MetaTv $131, - AppE "f" - [] - [VarE "acc", - PrimAppE (VNthP (MetaTv $130)) - [VarE "vec", - VarE "idx"]]) - (AppE "foldl_loop" - [] - [PrimAppE AddP - [VarE "idx", - LitE 1], - VarE "end",VarE "f", - VarE "acc1", - VarE "vec"])), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (foldl, - FunDef {funName = "foldl", - funArgs = [f,acc,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [ArrowTy [TyVar u:b, - TyVar u:a] - (TyVar u:b), - TyVar u:b, - VectorTy (TyVar u:a)] - (TyVar u:b)), - funBody = AppE "foldl_loop" - [] - [LitE 0, - PrimAppE (VLengthP (MetaTv $124)) - [VarE "vec"], - VarE "f",VarE "acc",VarE "vec"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (update, - FunDef {funName = "update", - funArgs = [vec,i,x], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - IntTy,TyVar u:a] - (VectorTy (TyVar u:a))), - funBody = AppE "generate" - [] - [AppE "length" [] [VarE "vec"], - Ext (LambdaE [(j, MetaTv $120)] - (IfE (PrimAppE EqIntP - [VarE "i", - VarE "j"]) - (VarE "x") - (PrimAppE (VNthP (MetaTv $119)) - [VarE "vec", - VarE "j"])))], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (lmap, - FunDef {funName = "lmap", - funArgs = [f,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [ArrowTy [TyVar u:a] - (TyVar u:b), - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:b))), - funBody = LetE (x, [], MetaTv $115, VarE "vec") - (AppE "map" [] [VarE "f",VarE "x"]), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (map, - FunDef {funName = "map", - funArgs = [f,vec], - funTy = ForAll [u:a,u:b] - (ArrowTy [ArrowTy [TyVar u:a] - (TyVar u:b), - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:b))), - funBody = AppE "generate" - [] - [PrimAppE (VLengthP (MetaTv $110)) - [VarE "vec"], - Ext (LambdaE [(i, MetaTv $112)] - (AppE "f" - [] - [PrimAppE (VNthP (MetaTv $111)) - [VarE "vec", - VarE "i"]]))], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (lcopy, - FunDef {funName = "lcopy", - funArgs = [vec], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = AppE "copy" [] [VarE "vec"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (copy, - FunDef {funName = "copy", - funArgs = [vec], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = AppE "generate" - [] - [PrimAppE (VLengthP (MetaTv $93)) - [VarE "vec"], - Ext (LambdaE [(i, MetaTv $94)] - (AppE "nth" - [] - [VarE "vec", - VarE "i"]))], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (generate_loop, - FunDef {funName = "generate_loop", - funArgs = [vec,idx,end,f], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - IntTy,IntTy, - ArrowTy [IntTy] - (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = IfE (PrimAppE EqIntP - [VarE "idx",VarE "end"]) - (VarE "vec") - (LetE (vec1, - [], - MetaTv $86, - PrimAppE (InplaceVUpdateP (MetaTv $85)) - [VarE "vec", - VarE "idx", - AppE "f" - [] - [VarE "idx"]]) - (AppE "generate_loop" - [] - [VarE "vec1", - PrimAppE AddP - [VarE "idx", - LitE 1], - VarE "end",VarE "f"])), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (tail, - FunDef {funName = "tail", - funArgs = [vec], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = AppE "slice" - [] - [LitE 1, - PrimAppE SubP - [PrimAppE (VLengthP (MetaTv $80)) - [VarE "vec"], - LitE 1], - VarE "vec"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (lsplitAt', - FunDef {funName = "lsplitAt'", - funArgs = [n,vec], - funTy = ForAll [u:a] - (ArrowTy [IntTy, - VectorTy (TyVar u:a)] - (ProdTy [IntTy, - VectorTy (TyVar u:a), - IntTy, - VectorTy (TyVar u:a)])), - funBody = LetE (tup74, - [], - MetaTv $75, - AppE "splitAt" - [] - [VarE "n",VarE "vec"]) - (LetE (x, - [], - MetaTv $77, - ProjE 0 (VarE "tup74")) - (LetE (y, - [], - MetaTv $76, - ProjE 1 (VarE "tup74")) - (MkProdE [PrimAppE (VLengthP (MetaTv $71)) - [VarE "x"], - VarE "x", - PrimAppE (VLengthP (MetaTv $73)) - [VarE "y"], - VarE "y"]))), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (lsplitAt, - FunDef {funName = "lsplitAt", - funArgs = [n,vec], - funTy = ForAll [u:a] - (ArrowTy [IntTy, - VectorTy (TyVar u:a)] - (ProdTy [IntTy, - VectorTy (TyVar u:a), - IntTy, - VectorTy (TyVar u:a)])), - funBody = LetE (x, [], MetaTv $67, VarE "vec") - (AppE "lsplitAt'" - [] - [VarE "n",VarE "x"]), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (splitAt, - FunDef {funName = "splitAt", - funArgs = [n,vec], - funTy = ForAll [u:a] - (ArrowTy [IntTy, - VectorTy (TyVar u:a)] - (ProdTy [VectorTy (TyVar u:a), - VectorTy (TyVar u:a)])), - funBody = LetE (len, - [], - MetaTv $64, - PrimAppE (VLengthP (MetaTv $63)) - [VarE "vec"]) - (LetE (n', - [], - MetaTv $62, - AppE "maxInt" - [] - [VarE "n",LitE 0]) - (LetE (m, - [], - MetaTv $61, - AppE "minInt" - [] - [VarE "n'", - VarE "len"]) - (LetE (m', - [], - MetaTv $60, - AppE "maxInt" - [] - [LitE 0, - PrimAppE SubP - [VarE "len", - VarE "n'"]]) - (MkProdE [PrimAppE (VSliceP (MetaTv $58)) - [LitE 0, - VarE "m", - VarE "vec"], - PrimAppE (VSliceP (MetaTv $59)) - [VarE "m", - VarE "m'", - VarE "vec"]])))), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (isEmpty, - FunDef {funName = "isEmpty", - funArgs = [vec], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a)] - BoolTy), - funBody = PrimAppE EqIntP - [PrimAppE (VLengthP (MetaTv $51)) - [VarE "vec"], - LitE 0], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (inplaceUpdate, - FunDef {funName = "inplaceUpdate", - funArgs = [i,val,vec], - funTy = ForAll [u:a] - (ArrowTy [IntTy,TyVar u:a, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = PrimAppE (InplaceVUpdateP (MetaTv $49)) - [VarE "vec",VarE "i", - VarE "val"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (inplaceSort, - FunDef {funName = "inplaceSort", - funArgs = [cmp,vec], - funTy = ForAll [u:a] - (ArrowTy [ArrowTy [TyVar u:a, - TyVar u:a] - IntTy, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = PrimAppE (InplaceVSortP (MetaTv $45)) - [VarE "vec",VarE "cmp"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (flatten, - FunDef {funName = "flatten", - funArgs = [ls], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (VectorTy (TyVar u:a))] - (VectorTy (TyVar u:a))), - funBody = PrimAppE (VConcatP (MetaTv $42)) - [VarE "ls"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (sort, - FunDef {funName = "sort", - funArgs = [cmp,vec], - funTy = ForAll [u:a] - (ArrowTy [ArrowTy [TyVar u:a, - TyVar u:a] - IntTy, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = PrimAppE (VSortP (MetaTv $40)) - [VarE "vec",VarE "cmp"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (merge, - FunDef {funName = "merge", - funArgs = [vec1,vec2], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = PrimAppE (VMergeP (MetaTv $37)) - [VarE "vec1",VarE "vec2"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (unsafeSlice, - FunDef {funName = "unsafeSlice", - funArgs = [i,n,vec], - funTy = ForAll [u:a] - (ArrowTy [IntTy,IntTy, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = PrimAppE (VSliceP (MetaTv $34)) - [VarE "i",VarE "n",VarE "vec"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (slice, - FunDef {funName = "slice", - funArgs = [i,n,vec], - funTy = ForAll [u:a] - (ArrowTy [IntTy,IntTy, - VectorTy (TyVar u:a)] - (VectorTy (TyVar u:a))), - funBody = PrimAppE (VSliceP (MetaTv $30)) - [VarE "i",VarE "n",VarE "vec"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (nth2, - FunDef {funName = "nth2", - funArgs = [vec,i], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - IntTy] - (ProdTy [TyVar u:a, - VectorTy (TyVar u:a)])), - funBody = LetE (tup26, [], MetaTv $24, VarE "vec") - (LetE (vec1, - [], - MetaTv $24, - VarE "tup26") - (LetE (vec2, - [], - MetaTv $25, - VarE "tup26") - (MkProdE [PrimAppE (VNthP (MetaTv $23)) - [VarE "vec1", - VarE "i"], - VarE "vec2"]))), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (nth1, - FunDef {funName = "nth1", - funArgs = [vec,i], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a), - IntTy] - (TyVar u:a)), - funBody = PrimAppE (VNthP (MetaTv $19)) - [VarE "vec",VarE "i"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (length2, - FunDef {funName = "length2", - funArgs = [vec], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a)] - (ProdTy [IntTy, - VectorTy (TyVar u:a)])), - funBody = LetE (tup12, [], MetaTv $10, VarE "vec") - (LetE (vec1, - [], - MetaTv $10, - VarE "tup12") - (LetE (vec2, - [], - MetaTv $11, - VarE "tup12") - (MkProdE [PrimAppE (VLengthP (MetaTv $9)) - [VarE "vec1"], - VarE "vec2"]))), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (length1, - FunDef {funName = "length1", - funArgs = [vec], - funTy = ForAll [u:a] - (ArrowTy [VectorTy (TyVar u:a)] - IntTy), - funBody = PrimAppE (VLengthP (MetaTv $6)) - [VarE "vec"], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}})], - mainExp = Nothing}) - [ImportDecl {importAnn = SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 10 1 10 22, srcInfoPoints = [SrcSpan ".hs" 10 1 10 7]}, importModule = ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 10 8 10 22, srcInfoPoints = []}) "Gibbon.Prelude", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}], - ProgModule "Gibbon.Prim" - (Prog {ddefs = [], fundefs = [], mainExp = Nothing}) - [], - ProgModule "Gibbon.Prelude" - (Prog - {ddefs = [], - fundefs = [(maxInt, - FunDef {funName = "maxInt", - funArgs = [a,b], - funTy = ForAll [] (ArrowTy [IntTy,IntTy] IntTy), - funBody = IfE (PrimAppE GtP [VarE "a",VarE "b"]) - (VarE "a") - (VarE "b"), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (print_space, - FunDef {funName = "print_space", - funArgs = [wildcard_20], - funTy = ForAll [] - (ArrowTy [ProdTy []] (ProdTy [])), - funBody = PrimAppE PrintSym [LitSymE " "], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (print_newline, - FunDef {funName = "print_newline", - funArgs = [wildcard_18], - funTy = ForAll [] - (ArrowTy [ProdTy []] (ProdTy [])), - funBody = PrimAppE PrintSym [LitSymE "\n"], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (print_check, - FunDef {funName = "print_check", - funArgs = [b], - funTy = ForAll [] (ArrowTy [BoolTy] (ProdTy [])), - funBody = IfE (VarE "b") - (LetE (wildcard_14, - [], - MetaTv $15, - PrimAppE PrintSym - [LitSymE "OK\n"]) - (MkProdE [])) - (LetE (wildcard_16, - [], - MetaTv $17, - PrimAppE PrintSym - [LitSymE "Err\n"]) - (MkProdE [])), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (compare_int, - FunDef {funName = "compare_int", - funArgs = [r1,r2], - funTy = ForAll [] (ArrowTy [IntTy,IntTy] IntTy), - funBody = IfE (PrimAppE LtP [VarE "r1",VarE "r2"]) - (PrimAppE SubP [LitE 0,LitE 1]) - (IfE (PrimAppE GtP - [VarE "r1",VarE "r2"]) - (LitE 1) - (LitE 0)), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (compare_float, - FunDef {funName = "compare_float", - funArgs = [r1,r2], - funTy = ForAll [] - (ArrowTy [FloatTy,FloatTy] IntTy), - funBody = IfE (PrimAppE FLtP [VarE "r1",VarE "r2"]) - (PrimAppE SubP [LitE 0,LitE 1]) - (IfE (PrimAppE FGtP - [VarE "r1",VarE "r2"]) - (LitE 1) - (LitE 0)), - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (float_abs, - FunDef {funName = "float_abs", - funArgs = [f], - funTy = ForAll [] (ArrowTy [FloatTy] FloatTy), - funBody = IfE (PrimAppE FLtP [VarE "f",FloatE 0.0]) - (PrimAppE FMulP - [VarE "f", - PrimAppE FSubP - [FloatE 0.0, - FloatE 1.0]]) - (VarE "f"), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (minFloat, - FunDef {funName = "minFloat", - funArgs = [a,b], - funTy = ForAll [] - (ArrowTy [FloatTy,FloatTy] FloatTy), - funBody = IfE (PrimAppE FLtP [VarE "a",VarE "b"]) - (VarE "a") - (VarE "b"), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (maxFloat, - FunDef {funName = "maxFloat", - funArgs = [a,b], - funTy = ForAll [] - (ArrowTy [FloatTy,FloatTy] FloatTy), - funBody = IfE (PrimAppE FGtP [VarE "a",VarE "b"]) - (VarE "a") - (VarE "b"), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (minInt, - FunDef {funName = "minInt", - funArgs = [a,b], - funTy = ForAll [] (ArrowTy [IntTy,IntTy] IntTy), - funBody = IfE (PrimAppE LtP [VarE "a",VarE "b"]) - (VarE "a") - (VarE "b"), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}})], - mainExp = Nothing}) - [ImportDecl {importAnn = SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 12 1 12 19, srcInfoPoints = [SrcSpan ".hs" 12 1 12 7]}, importModule = ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 12 8 12 19, srcInfoPoints = []}) "Gibbon.Prim", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}], - ProgModule "Gibbon.PList" - (Prog - {ddefs = [(PList, - DDef {tyName = "PList", - tyArgs = [u:a], - dataCons = [("Nil", []), - ("Cons", - [(False, TyVar u:a), - (False, - PackedTy "PList" [TyVar u:a])])]})], - fundefs = [(is_empty_plist, - FunDef {funName = "is_empty_plist", - funArgs = [ls], - funTy = ForAll [u:a] - (ArrowTy [PackedTy "PList" - [TyVar u:a]] - BoolTy), - funBody = CaseE (VarE "ls") - [("Nil", [], PrimAppE MkTrue []), - ("Cons", - [(wildcard_1, MetaTv $3), - (wildcard_2, MetaTv $4)], - PrimAppE MkFalse [])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (zip_plist, - FunDef {funName = "zip_plist", - funArgs = [as,bs], - funTy = ForAll [u:a,u:b] - (ArrowTy [PackedTy "PList" - [TyVar u:a], - PackedTy "PList" - [TyVar u:b]] - (PackedTy "PList" - [ProdTy [TyVar u:a, - TyVar u:b]])), - funBody = CaseE (VarE "as") - [("Nil", - [], - DataConE (MetaTv $71) "Nil" []), - ("Cons", - [(z, MetaTv $76), - (zs, MetaTv $77)], - CaseE (VarE "bs") - [("Nil", - [], - DataConE (MetaTv $72) - "Nil" - []), - ("Cons", - [(y, MetaTv $74), - (ys, MetaTv $75)], - DataConE (MetaTv $73) - "Cons" - [MkProdE [VarE "z", - VarE "y"], - AppE "zip_plist" - [] - [VarE "zs", - VarE "ys"]])])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (splitAt_plist, - FunDef {funName = "splitAt_plist", - funArgs = [n,a], - funTy = ForAll [u:a] - (ArrowTy [IntTy, - PackedTy "PList" - [TyVar u:a]] - (ProdTy [PackedTy "PList" - [TyVar u:a], - PackedTy "PList" - [TyVar u:a]])), - funBody = IfE (PrimAppE EqIntP [VarE "n",LitE 0]) - (MkProdE [DataConE (MetaTv $59) - "Nil" - [], - VarE "a"]) - (CaseE (VarE "a") - [("Nil", - [], - MkProdE [DataConE (MetaTv $60) - "Nil" - [], - DataConE (MetaTv $61) - "Nil" - []]), - ("Cons", - [(x, MetaTv $67), - (xs, MetaTv $68)], - LetE (tup63, - [], - MetaTv $64, - AppE "splitAt_plist" - [] - [PrimAppE SubP - [VarE "n", - LitE 1], - VarE "xs"]) - (LetE (c, - [], - MetaTv $66, - ProjE 0 - (VarE "tup63")) - (LetE (d, - [], - MetaTv $65, - ProjE 1 - (VarE "tup63")) - (MkProdE [DataConE (MetaTv $62) - "Cons" - [VarE "x", - VarE "c"], - VarE "d"]))))]), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (map_plist, - FunDef {funName = "map_plist", - funArgs = [f,ls], - funTy = ForAll [u:a,u:b] - (ArrowTy [ArrowTy [TyVar u:a] - (TyVar u:b), - PackedTy "PList" - [TyVar u:a]] - (PackedTy "PList" - [TyVar u:b])), - funBody = CaseE (VarE "ls") - [("Nil", - [], - DataConE (MetaTv $53) "Nil" []), - ("Cons", - [(x, MetaTv $55), - (xs, MetaTv $56)], - DataConE (MetaTv $54) - "Cons" - [AppE "f" [] [VarE "x"], - AppE "map_plist" - [] - [VarE "f", - VarE "xs"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (reverse_plist, - FunDef {funName = "reverse_plist", - funArgs = [xs,acc], - funTy = ForAll [u:a] - (ArrowTy [PackedTy "PList" - [TyVar u:a], - PackedTy "PList" - [TyVar u:a]] - (PackedTy "PList" - [TyVar u:a])), - funBody = CaseE (VarE "xs") - [("Nil", [], VarE "acc"), - ("Cons", - [(z, MetaTv $49), - (zs, MetaTv $50)], - AppE "reverse_plist" - [] - [VarE "zs", - DataConE (MetaTv $48) - "Cons" - [VarE "z", - VarE "acc"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (drop_plist, - FunDef {funName = "drop_plist", - funArgs = [num,list], - funTy = ForAll [u:a] - (ArrowTy [IntTy, - PackedTy "PList" - [TyVar u:a]] - (PackedTy "PList" - [TyVar u:a])), - funBody = CaseE (VarE "list") - [("Nil", - [], - DataConE (MetaTv $42) "Nil" []), - ("Cons", - [(x, MetaTv $44), - (rst, MetaTv $45)], - IfE (PrimAppE LtEqP - [VarE "num", - LitE 0]) - (DataConE (MetaTv $43) - "Cons" - [VarE "x", - VarE "rst"]) - (AppE "drop_plist" - [] - [PrimAppE SubP - [VarE "num", - LitE 1], - VarE "rst"]))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (take_plist, - FunDef {funName = "take_plist", - funArgs = [n,a], - funTy = ForAll [u:a] - (ArrowTy [IntTy, - PackedTy "PList" - [TyVar u:a]] - (PackedTy "PList" - [TyVar u:a])), - funBody = IfE (PrimAppE EqIntP [VarE "n",LitE 0]) - (DataConE (MetaTv $35) "Nil" []) - (CaseE (VarE "a") - [("Nil", - [], - DataConE (MetaTv $36) - "Nil" - []), - ("Cons", - [(z, MetaTv $38), - (zs, MetaTv $39)], - DataConE (MetaTv $37) - "Cons" - [VarE "z", - AppE "take_plist" - [] - [PrimAppE SubP - [VarE "n", - LitE 1], - VarE "zs"]])]), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (filter_plist, - FunDef {funName = "filter_plist", - funArgs = [f,a], - funTy = ForAll [u:a] - (ArrowTy [ArrowTy [TyVar u:a] - BoolTy, - PackedTy "PList" - [TyVar u:a]] - (PackedTy "PList" - [TyVar u:a])), - funBody = CaseE (VarE "a") - [("Nil", - [], - DataConE (MetaTv $29) "Nil" []), - ("Cons", - [(z, MetaTv $31), - (zs, MetaTv $32)], - IfE (AppE "f" [] [VarE "z"]) - (DataConE (MetaTv $30) - "Cons" - [VarE "z", - AppE "filter_plist" - [] - [VarE "f", - VarE "zs"]]) - (AppE "filter_plist" - [] - [VarE "f", - VarE "zs"]))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (length_plist, - FunDef {funName = "length_plist", - funArgs = [a], - funTy = ForAll [u:a] - (ArrowTy [PackedTy "PList" - [TyVar u:a]] - IntTy), - funBody = CaseE (VarE "a") - [("Nil", [], LitE 0), - ("Cons", - [(x, MetaTv $25), - (xs, MetaTv $26)], - PrimAppE AddP - [LitE 1, - AppE "length_plist" - [] - [VarE "xs"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (nth_plist, - FunDef {funName = "nth_plist", - funArgs = [list,def,index,start], - funTy = ForAll [u:a] - (ArrowTy [PackedTy "PList" - [TyVar u:a], - TyVar u:a,IntTy,IntTy] - (TyVar u:a)), - funBody = CaseE (VarE "list") - [("Nil", [], VarE "def"), - ("Cons", - [(x, MetaTv $22), - (rst, MetaTv $23)], - IfE (PrimAppE EqIntP - [VarE "index", - VarE "start"]) - (VarE "x") - (AppE "nth_plist" - [] - [VarE "rst",VarE "def", - VarE "index", - PrimAppE AddP - [VarE "start", - LitE 1]]))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (elem_plist, - FunDef {funName = "elem_plist", - funArgs = [cmp,a,list], - funTy = ForAll [u:a] - (ArrowTy [ArrowTy [TyVar u:a, - TyVar u:a] - IntTy, - TyVar u:a, - PackedTy "PList" - [TyVar u:a]] - BoolTy), - funBody = CaseE (VarE "list") - [("Nil", [], PrimAppE MkFalse []), - ("Cons", - [(x, MetaTv $16), - (rst, MetaTv $17)], - IfE (PrimAppE EqIntP - [AppE "cmp" - [] - [VarE "x", - VarE "a"], - LitE 0]) - (PrimAppE MkTrue []) - (AppE "elem_plist" - [] - [VarE "cmp",VarE "a", - VarE "rst"]))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (tail_plist, - FunDef {funName = "tail_plist", - funArgs = [ls], - funTy = ForAll [u:a] - (ArrowTy [PackedTy "PList" - [TyVar u:a]] - (PackedTy "PList" - [TyVar u:a])), - funBody = CaseE (VarE "ls") - [("Cons", - [(wildcard_10, MetaTv $11), - (xs, MetaTv $12)], - VarE "xs")], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (head_plist, - FunDef {funName = "head_plist", - funArgs = [ls], - funTy = ForAll [u:a] - (ArrowTy [PackedTy "PList" - [TyVar u:a]] - (TyVar u:a)), - funBody = CaseE (VarE "ls") - [("Cons", - [(x, MetaTv $7), - (wildcard_6, MetaTv $8)], - VarE "x")], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}})], - mainExp = Nothing}) - [ImportDecl {importAnn = SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 8 1 8 22, srcInfoPoints = [SrcSpan ".hs" 8 1 8 7]}, importModule = ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 8 8 8 22, srcInfoPoints = []}) "Gibbon.Prelude", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}], - ProgModule "Basics" - (Prog - {ddefs = [(Inline, - DDef {tyName = "Inline", - tyArgs = [], - dataCons = [("Str", [(False, VectorTy CharTy)]), - ("Emph", - [(False, - PackedTy "PList" - [PackedTy "Inline" []])]), - ("Space", [])]}), - (Block, - DDef {tyName = "Block", - tyArgs = [], - dataCons = [("Plain", - [(False, - PackedTy "PList" - [PackedTy "Inline" []])]), - ("Null", [])]}), - (BlogHeader, - DDef {tyName = "BlogHeader", - tyArgs = [], - dataCons = [("Header", [(False, VectorTy CharTy)])]}), - (BlogId, - DDef {tyName = "BlogId", - tyArgs = [], - dataCons = [("ID", [(False, IntTy)])]}), - (BlogAuthor, - DDef {tyName = "BlogAuthor", - tyArgs = [], - dataCons = [("Author", [(False, VectorTy CharTy)])]}), - (BlogDate, - DDef {tyName = "BlogDate", - tyArgs = [], - dataCons = [("Date", [(False, VectorTy CharTy)])]}), - (BlogContent, - DDef {tyName = "BlogContent", - tyArgs = [], - dataCons = [("Content", - [(False, PackedTy "Block" [])])]}), - (BlogTags, - DDef {tyName = "BlogTags", - tyArgs = [], - dataCons = [("TagList", - [(False, - PackedTy "PList" - [VectorTy CharTy])])]}), - (Blog, - DDef {tyName = "Blog", - tyArgs = [], - dataCons = [("End", []), - ("Layout1", - [(False, PackedTy "BlogHeader" []), - (False, PackedTy "BlogId" []), - (False, PackedTy "BlogAuthor" []), - (False, PackedTy "BlogDate" []), - (False, PackedTy "BlogContent" []), - (False, PackedTy "BlogTags" []), - (False, PackedTy "Blog" [])]), - ("Layout2", - [(False, PackedTy "BlogContent" []), - (False, PackedTy "BlogTags" []), - (False, PackedTy "Blog" []), - (False, PackedTy "BlogHeader" []), - (False, PackedTy "BlogId" []), - (False, PackedTy "BlogAuthor" []), - (False, PackedTy "BlogDate" [])]), - ("Layout3", - [(False, PackedTy "BlogTags" []), - (False, PackedTy "Blog" []), - (False, PackedTy "BlogContent" []), - (False, PackedTy "BlogHeader" []), - (False, PackedTy "BlogId" []), - (False, PackedTy "BlogAuthor" []), - (False, PackedTy "BlogDate" [])]), - ("Layout4", - [(False, PackedTy "BlogTags" []), - (False, PackedTy "BlogContent" []), - (False, PackedTy "Blog" []), - (False, PackedTy "BlogHeader" []), - (False, PackedTy "BlogId" []), - (False, PackedTy "BlogAuthor" []), - (False, PackedTy "BlogDate" [])]), - ("Layout5", - [(False, PackedTy "Blog" []), - (False, PackedTy "BlogTags" []), - (False, PackedTy "BlogContent" []), - (False, PackedTy "BlogHeader" []), - (False, PackedTy "BlogId" []), - (False, PackedTy "BlogAuthor" []), - (False, PackedTy "BlogDate" [])]), - ("Layout6", - [(False, PackedTy "BlogHeader" []), - (False, PackedTy "BlogId" []), - (False, PackedTy "BlogAuthor" []), - (False, PackedTy "BlogDate" []), - (False, PackedTy "BlogContent" []), - (False, PackedTy "Blog" []), - (False, PackedTy "BlogTags" [])]), - ("Layout7", - [(False, PackedTy "Blog" []), - (False, PackedTy "BlogContent" []), - (False, PackedTy "BlogHeader" []), - (False, PackedTy "BlogId" []), - (False, PackedTy "BlogAuthor" []), - (False, PackedTy "BlogDate" []), - (False, PackedTy "BlogTags" [])]), - ("Layout8", - [(False, PackedTy "BlogContent" []), - (False, PackedTy "Blog" []), - (False, PackedTy "BlogId" []), - (False, PackedTy "BlogAuthor" []), - (False, PackedTy "BlogDate" []), - (False, PackedTy "BlogHeader" []), - (False, PackedTy "BlogTags" [])])]})], - fundefs = [(emphasizeKeywordInBlock, - FunDef {funName = "emphasizeKeywordInBlock", - funArgs = [keyword,contentBlock], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "Block" []] - (PackedTy "Block" [])), - funBody = CaseE (VarE "contentBlock") - [("Plain", - [(list_inline, MetaTv $91)], - DataConE (MetaTv $90) - "Plain" - [AppE "emphasizeInlineListForKeyword" - [] - [VarE "keyword", - VarE "list_inline"]]), - ("Null", - [], - DataConE (MetaTv $92) - "Null" - [])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printBlog, - FunDef {funName = "printBlog", - funArgs = [blog], - funTy = ForAll [] - (ArrowTy [PackedTy "Blog" []] - (ProdTy [])), - funBody = CaseE (VarE "blog") - [("Layout1", - [(header, MetaTv $346), - (id, MetaTv $347), - (author, MetaTv $348), - (date, MetaTv $349), - (content, MetaTv $350), - (tags, MetaTv $351), - (rst, MetaTv $352)], - LetE (wildcard_344, - [], - MetaTv $345, - PrimAppE PrintSym - [LitSymE "Layout1 "]) - (LetE (wildcard_342, - [], - MetaTv $343, - AppE "printHeader" - [] - [VarE "header"]) - (LetE (wildcard_340, - [], - MetaTv $341, - AppE "printID" - [] - [VarE "id"]) - (LetE (wildcard_338, - [], - MetaTv $339, - AppE "printAuthor" - [] - [VarE "author"]) - (LetE (wildcard_336, - [], - MetaTv $337, - AppE "printDate" - [] - [VarE "date"]) - (LetE (wildcard_334, - [], - MetaTv $335, - AppE "printContent" - [] - [VarE "content"]) - (LetE (wildcard_332, - [], - MetaTv $333, - AppE "printTagList" - [] - [VarE "tags"]) - (LetE (wildcard_330, - [], - MetaTv $331, - AppE "printBlog" - [] - [VarE "rst"]) - (MkProdE [])))))))))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (getChar, - FunDef {funName = "getChar", - funArgs = [decimal], - funTy = ForAll [] (ArrowTy [IntTy] CharTy), - funBody = IfE (PrimAppE EqIntP - [VarE "decimal",LitE 0]) - (CharE 'a') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 1]) - (CharE 'b') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 2]) - (CharE 'c') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 3]) - (CharE 'd') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 4]) - (CharE 'e') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 5]) - (CharE 'f') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 6]) - (CharE 'g') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 7]) - (CharE 'h') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 8]) - (CharE 'i') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 9]) - (CharE 'j') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 10]) - (CharE 'k') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 11]) - (CharE 'l') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 12]) - (CharE 'm') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 13]) - (CharE 'n') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 14]) - (CharE 'o') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 15]) - (CharE 'p') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 16]) - (CharE 'q') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 17]) - (CharE 'r') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 18]) - (CharE 's') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 19]) - (CharE 't') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 20]) - (CharE 'u') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 21]) - (CharE 'v') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 22]) - (CharE 'w') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 23]) - (CharE 'x') - (IfE (PrimAppE EqIntP - [VarE "decimal", - LitE 24]) - (CharE 'y') - (CharE 'z'))))))))))))))))))))))))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printInline, - FunDef {funName = "printInline", - funArgs = [inline], - funTy = ForAll [] - (ArrowTy [PackedTy "Inline" []] - (ProdTy [])), - funBody = CaseE (VarE "inline") - [("Str", - [(text, MetaTv $394)], - LetE (wildcard_392, - [], - MetaTv $393, - PrimAppE PrintSym - [LitSymE "Str "]) - (LetE (wildcard_390, - [], - MetaTv $391, - AppE "printVec" - [] - [Ext (LambdaE [(i, - MetaTv $389)] - (PrimAppE PrintChar - [VarE "i"])), - VarE "text"]) - (MkProdE []))), - ("Emph", - [(plist, MetaTv $399)], - LetE (wildcard_397, - [], - MetaTv $398, - PrimAppE PrintSym - [LitSymE "Emph "]) - (LetE (wildcard_395, - [], - MetaTv $396, - AppE "printPlistInline" - [] - [VarE "plist"]) - (MkProdE []))), - ("Space", - [], - LetE (wildcard_400, - [], - MetaTv $401, - PrimAppE PrintSym - [LitSymE "Space "]) - (MkProdE []))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printPlistText, - FunDef {funName = "printPlistText", - funArgs = [list], - funTy = ForAll [] - (ArrowTy [PackedTy "PList" - [VectorTy CharTy]] - (ProdTy [])), - funBody = CaseE (VarE "list") - [("Cons", - [(x, MetaTv $384), - (rst, MetaTv $385)], - LetE (wildcard_382, - [], - MetaTv $383, - PrimAppE PrintSym - [LitSymE "PList ( Cons "]) - (LetE (wildcard_380, - [], - MetaTv $381, - AppE "printVec" - [] - [Ext (LambdaE [(i, - MetaTv $379)] - (PrimAppE PrintChar - [VarE "i"])), - VarE "x"]) - (LetE (wildcard_377, - [], - MetaTv $378, - AppE "printPlistText" - [] - [VarE "rst"]) - (LetE (wildcard_375, - [], - MetaTv $376, - PrimAppE PrintSym - [LitSymE " ) "]) - (MkProdE []))))), - ("Nil", - [], - LetE (wildcard_386, - [], - MetaTv $387, - PrimAppE PrintSym - [LitSymE "Nil"]) - (MkProdE []))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printPlistInline, - FunDef {funName = "printPlistInline", - funArgs = [list], - funTy = ForAll [] - (ArrowTy [PackedTy "PList" - [PackedTy "Inline" - []]] - (ProdTy [])), - funBody = CaseE (VarE "list") - [("Cons", - [(x, MetaTv $370), - (rst, MetaTv $371)], - LetE (wildcard_368, - [], - MetaTv $369, - PrimAppE PrintSym - [LitSymE "PList ( Cons "]) - (LetE (wildcard_366, - [], - MetaTv $367, - AppE "printInline" - [] - [VarE "x"]) - (LetE (wildcard_364, - [], - MetaTv $365, - AppE "printPlistInline" - [] - [VarE "rst"]) - (LetE (wildcard_362, - [], - MetaTv $363, - PrimAppE PrintSym - [LitSymE " ) "]) - (MkProdE []))))), - ("Nil", - [], - LetE (wildcard_372, - [], - MetaTv $373, - PrimAppE PrintSym - [LitSymE "Nil"]) - (MkProdE []))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printBlock, - FunDef {funName = "printBlock", - funArgs = [block], - funTy = ForAll [] - (ArrowTy [PackedTy "Block" []] - (ProdTy [])), - funBody = CaseE (VarE "block") - [("Plain", - [(plist, MetaTv $358)], - LetE (wildcard_356, - [], - MetaTv $357, - PrimAppE PrintSym - [LitSymE "Plain "]) - (LetE (wildcard_354, - [], - MetaTv $355, - AppE "printPlistInline" - [] - [VarE "plist"]) - (MkProdE []))), - ("Null", - [], - LetE (wildcard_359, - [], - MetaTv $360, - PrimAppE PrintSym - [LitSymE "Null"]) - (MkProdE []))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printID, - FunDef {funName = "printID", - funArgs = [id], - funTy = ForAll [] - (ArrowTy [PackedTy "BlogId" []] - (ProdTy [])), - funBody = CaseE (VarE "id") - [("ID", - [(val, MetaTv $328)], - LetE (wildcard_326, - [], - MetaTv $327, - PrimAppE PrintSym - [LitSymE "ID "]) - (LetE (wildcard_324, - [], - MetaTv $325, - PrimAppE PrintInt - [VarE "val"]) - (MkProdE [])))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printHeader, - FunDef {funName = "printHeader", - funArgs = [header], - funTy = ForAll [] - (ArrowTy [PackedTy "BlogHeader" []] - (ProdTy [])), - funBody = CaseE (VarE "header") - [("Header", - [(str, MetaTv $322)], - LetE (wildcard_320, - [], - MetaTv $321, - PrimAppE PrintSym - [LitSymE "Header "]) - (LetE (wildcard_318, - [], - MetaTv $319, - AppE "printVec" - [] - [Ext (LambdaE [(i, - MetaTv $317)] - (PrimAppE PrintChar - [VarE "i"])), - VarE "str"]) - (MkProdE [])))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printAuthor, - FunDef {funName = "printAuthor", - funArgs = [date], - funTy = ForAll [] - (ArrowTy [PackedTy "BlogAuthor" []] - (ProdTy [])), - funBody = CaseE (VarE "date") - [("Author", - [(str, MetaTv $315)], - LetE (wildcard_313, - [], - MetaTv $314, - PrimAppE PrintSym - [LitSymE "Author "]) - (LetE (wildcard_311, - [], - MetaTv $312, - AppE "printVec" - [] - [Ext (LambdaE [(i, - MetaTv $310)] - (PrimAppE PrintChar - [VarE "i"])), - VarE "str"]) - (MkProdE [])))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printDate, - FunDef {funName = "printDate", - funArgs = [date], - funTy = ForAll [] - (ArrowTy [PackedTy "BlogDate" []] - (ProdTy [])), - funBody = CaseE (VarE "date") - [("Date", - [(str, MetaTv $308)], - LetE (wildcard_306, - [], - MetaTv $307, - PrimAppE PrintSym - [LitSymE "Date "]) - (LetE (wildcard_304, - [], - MetaTv $305, - AppE "printVec" - [] - [Ext (LambdaE [(i, - MetaTv $303)] - (PrimAppE PrintChar - [VarE "i"])), - VarE "str"]) - (MkProdE [])))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printTagList, - FunDef {funName = "printTagList", - funArgs = [tags], - funTy = ForAll [] - (ArrowTy [PackedTy "BlogTags" []] - (ProdTy [])), - funBody = CaseE (VarE "tags") - [("TagList", - [(plist, MetaTv $301)], - LetE (wildcard_299, - [], - MetaTv $300, - PrimAppE PrintSym - [LitSymE "TagList "]) - (LetE (wildcard_297, - [], - MetaTv $298, - AppE "printPlistText" - [] - [VarE "plist"]) - (MkProdE [])))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printContent, - FunDef {funName = "printContent", - funArgs = [content], - funTy = ForAll [] - (ArrowTy [PackedTy "BlogContent" []] - (ProdTy [])), - funBody = CaseE (VarE "content") - [("Content", - [(block, MetaTv $295)], - LetE (wildcard_293, - [], - MetaTv $294, - PrimAppE PrintSym - [LitSymE "Content "]) - (LetE (wildcard_291, - [], - MetaTv $292, - AppE "printBlock" - [] - [VarE "block"]) - (MkProdE [])))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (blogLength, - FunDef {funName = "blogLength", - funArgs = [blog], - funTy = ForAll [] - (ArrowTy [PackedTy "Blog" []] - IntTy), - funBody = CaseE (VarE "blog") - [("End", [], LitE 0), - ("Layout1", - [(a, MetaTv $234), - (b, MetaTv $235), - (c, MetaTv $236), - (d, MetaTv $237), - (e, MetaTv $238), - (f, MetaTv $239), - (rst, MetaTv $240)], - PrimAppE AddP - [LitE 1, - AppE "blogLength" - [] - [VarE "rst"]]), - ("Layout2", - [(a, MetaTv $241), - (b, MetaTv $242), - (rst, MetaTv $243), - (c, MetaTv $244), - (d, MetaTv $245), - (e, MetaTv $246), - (f, MetaTv $247)], - PrimAppE AddP - [LitE 1, - AppE "blogLength" - [] - [VarE "rst"]]), - ("Layout3", - [(a, MetaTv $248), - (rst, MetaTv $249), - (b, MetaTv $250), - (c, MetaTv $251), - (d, MetaTv $252), - (e, MetaTv $253), - (f, MetaTv $254)], - PrimAppE AddP - [LitE 1, - AppE "blogLength" - [] - [VarE "rst"]]), - ("Layout4", - [(a, MetaTv $255), - (b, MetaTv $256), - (rst, MetaTv $257), - (d, MetaTv $258), - (e, MetaTv $259), - (f, MetaTv $260), - (g, MetaTv $261)], - PrimAppE AddP - [LitE 1, - AppE "blogLength" - [] - [VarE "rst"]]), - ("Layout5", - [(rst, MetaTv $262), - (a, MetaTv $263), - (b, MetaTv $264), - (c, MetaTv $265), - (d, MetaTv $266), - (e, MetaTv $267), - (f, MetaTv $268)], - PrimAppE AddP - [LitE 1, - AppE "blogLength" - [] - [VarE "rst"]]), - ("Layout6", - [(a, MetaTv $269), - (b, MetaTv $270), - (c, MetaTv $271), - (d, MetaTv $272), - (e, MetaTv $273), - (rst, MetaTv $274), - (f, MetaTv $275)], - PrimAppE AddP - [LitE 1, - AppE "blogLength" - [] - [VarE "rst"]]), - ("Layout7", - [(rst, MetaTv $276), - (a, MetaTv $277), - (b, MetaTv $278), - (c, MetaTv $279), - (d, MetaTv $280), - (e, MetaTv $281), - (f, MetaTv $282)], - PrimAppE AddP - [LitE 1, - AppE "blogLength" - [] - [VarE "rst"]]), - ("Layout8", - [(a, MetaTv $283), - (rst, MetaTv $284), - (b, MetaTv $285), - (c, MetaTv $286), - (d, MetaTv $287), - (e, MetaTv $288), - (f, MetaTv $289)], - PrimAppE AddP - [LitE 1, - AppE "blogLength" - [] - [VarE "rst"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkBlockList, - FunDef {funName = "mkBlockList", - funArgs = [length,base], - funTy = ForAll [] - (ArrowTy [IntTy,IntTy] - (PackedTy "PList" - [PackedTy "Block" - []])), - funBody = IfE (PrimAppE LtEqP - [VarE "length",LitE 0]) - (DataConE (MetaTv $224) "Nil" []) - (IfE (PrimAppE EqIntP - [VarE "base",LitE 0]) - (LetE (item, - [], - MetaTv $228, - DataConE (MetaTv $227) - "Plain" - [AppE "mkInlineList" - [] - [LitE 1000, - LitE 1]]) - (LetE (rst, - [], - MetaTv $226, - AppE "mkBlockList" - [] - [PrimAppE SubP - [VarE "length", - LitE 1], - VarE "base"]) - (DataConE (MetaTv $225) - "Cons" - [VarE "item", - VarE "rst"]))) - (LetE (item, - [], - MetaTv $232, - DataConE (MetaTv $231) - "Null" - []) - (LetE (rst, - [], - MetaTv $230, - AppE "mkBlockList" - [] - [PrimAppE SubP - [VarE "length", - LitE 1], - VarE "base"]) - (DataConE (MetaTv $229) - "Cons" - [VarE "item", - VarE "rst"])))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkSomeTags, - FunDef {funName = "mkSomeTags", - funArgs = [len], - funTy = ForAll [] - (ArrowTy [IntTy] - (PackedTy "PList" - [VectorTy CharTy])), - funBody = IfE (PrimAppE LtEqP [VarE "len",LitE 0]) - (DataConE (MetaTv $217) "Nil" []) - (LetE (word, - [], - MetaTv $221, - LetE (vec220, - [], - VectorTy CharTy, - PrimAppE (VAllocP CharTy) - [LitE 1]) - (LetE (_, - [], - VectorTy CharTy, - PrimAppE (InplaceVUpdateP CharTy) - [VarE "vec220", - LitE 0, - CharE 'a']) - (VarE "vec220"))) - (LetE (rst, - [], - MetaTv $219, - AppE "mkSomeTags" - [] - [PrimAppE SubP - [VarE "len", - LitE 1]]) - (DataConE (MetaTv $218) - "Cons" - [VarE "word", - VarE "rst"]))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkRandomInlineList, - FunDef {funName = "mkRandomInlineList", - funArgs = [len], - funTy = ForAll [] - (ArrowTy [IntTy] - (PackedTy "PList" - [PackedTy "Inline" - []])), - funBody = IfE (PrimAppE LtEqP [VarE "len",LitE 0]) - (DataConE (MetaTv $211) "Nil" []) - (LetE (word, - [], - MetaTv $215, - DataConE (MetaTv $214) - "Str" - [AppE "getRandomString" - [] - [LitE 1]]) - (LetE (rst, - [], - MetaTv $213, - AppE "mkRandomInlineList" - [] - [PrimAppE SubP - [VarE "len", - LitE 1]]) - (DataConE (MetaTv $212) - "Cons" - [VarE "word", - VarE "rst"]))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkInlineList', - FunDef {funName = "mkInlineList'", - funArgs = [length,index,words], - funTy = ForAll [] - (ArrowTy [IntTy,IntTy, - VectorTy (VectorTy CharTy)] - (PackedTy "PList" - [PackedTy "Inline" - []])), - funBody = IfE (PrimAppE GtEqP - [VarE "index", - VarE "length"]) - (DataConE (MetaTv $205) "Nil" []) - (LetE (item, - [], - MetaTv $209, - DataConE (MetaTv $208) - "Str" - [AppE "nth" - [] - [VarE "words", - VarE "index"]]) - (LetE (rst, - [], - MetaTv $207, - AppE "mkInlineList'" - [] - [VarE "length", - PrimAppE AddP - [VarE "index", - LitE 1], - VarE "words"]) - (DataConE (MetaTv $206) - "Cons" - [VarE "item", - VarE "rst"]))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkInlineList, - FunDef {funName = "mkInlineList", - funArgs = [length,base], - funTy = ForAll [] - (ArrowTy [IntTy,IntTy] - (PackedTy "PList" - [PackedTy "Inline" - []])), - funBody = IfE (PrimAppE LtEqP - [VarE "length",LitE 0]) - (DataConE (MetaTv $194) "Nil" []) - (IfE (PrimAppE EqIntP - [VarE "base",LitE 0]) - (LetE (item, - [], - MetaTv $198, - DataConE (MetaTv $197) - "Emph" - [AppE "mkInlineList" - [] - [LitE 100, - LitE 1]]) - (LetE (rst, - [], - MetaTv $196, - AppE "mkInlineList" - [] - [PrimAppE SubP - [VarE "length", - LitE 1], - VarE "base"]) - (DataConE (MetaTv $195) - "Cons" - [VarE "item", - VarE "rst"]))) - (LetE (item, - [], - MetaTv $201, - AppE "mkInlineBaseCase" - [] - [PrimAppE ModP - [PrimAppE RandP - [], - LitE 4]]) - (LetE (rst, - [], - MetaTv $200, - AppE "mkInlineList" - [] - [PrimAppE SubP - [VarE "length", - LitE 1], - VarE "base"]) - (DataConE (MetaTv $199) - "Cons" - [VarE "item", - VarE "rst"])))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkInlineBaseCase, - FunDef {funName = "mkInlineBaseCase", - funArgs = [option], - funTy = ForAll [] - (ArrowTy [IntTy] - (PackedTy "Inline" [])), - funBody = IfE (PrimAppE EqIntP - [VarE "option",LitE 0]) - (DataConE (MetaTv $190) - "Str" - [AppE "getRandomString" - [] - [LitE 5]]) - (DataConE (MetaTv $191) "Space" []), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkContentFromText, - FunDef {funName = "mkContentFromText", - funArgs = [f], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy] - (PackedTy "BlogContent" - [])), - funBody = LetE (block, - [], - MetaTv $188, - AppE "fileToContent" - [] - [VarE "f", - AppE "singleton" - [] - [AppE "nth" - [] - [VarE "f", - LitE 0]], - DataConE (MetaTv $186) - "Nil" - [], - LitE 1, - PrimAppE (VLengthP (MetaTv $187)) - [VarE "f"]]) - (LetE (content, - [], - MetaTv $185, - AppE "mkBlogContent" - [] - [VarE "block"]) - (VarE "content")), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkTagsFromText, - FunDef {funName = "mkTagsFromText", - funArgs = [f'], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy] - (PackedTy "BlogTags" [])), - funBody = LetE (tags, - [], - MetaTv $183, - AppE "fileToTags" - [] - [VarE "f'", - AppE "singleton" - [] - [AppE "nth" - [] - [VarE "f'", - LitE 0]], - LitE 1, - PrimAppE (VLengthP (MetaTv $182)) - [VarE "f'"]]) - (LetE (tags', - [], - MetaTv $181, - DataConE (MetaTv $180) - "TagList" - [VarE "tags"]) - (VarE "tags'")), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (fileToTags, - FunDef {funName = "fileToTags", - funArgs = [file,word,index,max_len], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - VectorTy CharTy,IntTy, - IntTy] - (PackedTy "PList" - [VectorTy CharTy])), - funBody = IfE (PrimAppE GtEqP - [VarE "index", - VarE "max_len"]) - (DataConE (MetaTv $174) "Nil" []) - (LetE (character, - [], - CharTy, - AppE "nth" - [] - [VarE "file", - VarE "index"]) - (LetE (isSpace, - [], - MetaTv $178, - IfE (PrimAppE EqCharP - [VarE "character", - AppE "head" - [] - [LetE (vec177, - [], - VectorTy CharTy, - PrimAppE (VAllocP CharTy) - [LitE 1]) - (LetE (_, - [], - VectorTy CharTy, - PrimAppE (InplaceVUpdateP CharTy) - [VarE "vec177", - LitE 0, - CharE ' ']) - (VarE "vec177"))]]) - (PrimAppE MkTrue []) - (PrimAppE MkFalse - [])) - (LetE (char_vec, - [], - MetaTv $176, - AppE "singleton" - [] - [VarE "character"]) - (IfE (VarE "isSpace") - (DataConE (MetaTv $175) - "Cons" - [VarE "word", - AppE "fileToTags" - [] - [VarE "file", - AppE "singleton" - [] - [AppE "nth" - [] - [VarE "file", - PrimAppE AddP - [VarE "index", - LitE 1]]], - PrimAppE AddP - [VarE "index", - LitE 2], - VarE "max_len"]]) - (AppE "fileToTags" - [] - [VarE "file", - AppE "append" - [] - [VarE "word", - VarE "char_vec"], - PrimAppE AddP - [VarE "index", - LitE 1], - VarE "max_len"]))))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (printWordList, - FunDef {funName = "printWordList", - funArgs = [vec,start,end], - funTy = ForAll [] - (ArrowTy [VectorTy (VectorTy CharTy), - IntTy,IntTy] - (ProdTy [])), - funBody = IfE (PrimAppE LtP - [VarE "start",VarE "end"]) - (LetE (element, - [], - MetaTv $169, - AppE "nth" - [] - [VarE "vec", - VarE "start"]) - (LetE (wildcard_167, - [], - MetaTv $168, - AppE "printVec" - [] - [Ext (LambdaE [(i, - MetaTv $166)] - (PrimAppE PrintChar - [VarE "i"])), - VarE "element"]) - (AppE "printWordList" - [] - [VarE "vec", - PrimAppE AddP - [VarE "start", - LitE 1], - VarE "end"]))) - (MkProdE []), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (fileToContent', - FunDef {funName = "fileToContent'", - funArgs = [file,word,running_list,index,max_len], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - VectorTy CharTy, - VectorTy (VectorTy CharTy), - IntTy,IntTy] - (VectorTy (VectorTy CharTy))), - funBody = IfE (PrimAppE GtEqP - [VarE "index", - VarE "max_len"]) - (AppE "append" - [] - [VarE "running_list", - PrimAppE (VAllocP (MetaTv $158)) - [LitE 0]]) - (LetE (character, - [], - CharTy, - AppE "nth" - [] - [VarE "file", - VarE "index"]) - (LetE (isSpace, - [], - MetaTv $162, - IfE (PrimAppE EqCharP - [VarE "character", - AppE "head" - [] - [LetE (vec161, - [], - VectorTy CharTy, - PrimAppE (VAllocP CharTy) - [LitE 1]) - (LetE (_, - [], - VectorTy CharTy, - PrimAppE (InplaceVUpdateP CharTy) - [VarE "vec161", - LitE 0, - CharE ' ']) - (VarE "vec161"))]]) - (PrimAppE MkTrue []) - (PrimAppE MkFalse - [])) - (LetE (char_vec, - [], - MetaTv $160, - AppE "singleton" - [] - [VarE "character"]) - (IfE (VarE "isSpace") - (AppE "fileToContent'" - [] - [VarE "file", - AppE "singleton" - [] - [AppE "nth" - [] - [VarE "file", - PrimAppE AddP - [VarE "index", - LitE 1]]], - AppE "append" - [] - [VarE "running_list", - AppE "generate" - [] - [LitE 1, - Ext (LambdaE [(i, - MetaTv $159)] - (VarE "word"))]], - PrimAppE AddP - [VarE "index", - LitE 2], - VarE "max_len"]) - (AppE "fileToContent'" - [] - [VarE "file", - AppE "append" - [] - [VarE "word", - VarE "char_vec"], - VarE "running_list", - PrimAppE AddP - [VarE "index", - LitE 1], - VarE "max_len"]))))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (fileToContent, - FunDef {funName = "fileToContent", - funArgs = [file,word,plist_inline,index,max_len], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - VectorTy CharTy, - PackedTy "PList" - [PackedTy "Inline" - []], - IntTy,IntTy] - (PackedTy "Block" [])), - funBody = IfE (PrimAppE GtEqP - [VarE "index", - VarE "max_len"]) - (DataConE (MetaTv $147) - "Plain" - [VarE "plist_inline"]) - (LetE (character, - [], - CharTy, - AppE "nth" - [] - [VarE "file", - VarE "index"]) - (LetE (isSpace, - [], - MetaTv $152, - IfE (PrimAppE EqCharP - [VarE "character", - AppE "head" - [] - [LetE (vec151, - [], - VectorTy CharTy, - PrimAppE (VAllocP CharTy) - [LitE 1]) - (LetE (_, - [], - VectorTy CharTy, - PrimAppE (InplaceVUpdateP CharTy) - [VarE "vec151", - LitE 0, - CharE ' ']) - (VarE "vec151"))]]) - (PrimAppE MkTrue []) - (PrimAppE MkFalse - [])) - (LetE (char_vec, - [], - MetaTv $150, - AppE "singleton" - [] - [VarE "character"]) - (IfE (VarE "isSpace") - (AppE "fileToContent" - [] - [VarE "file", - AppE "singleton" - [] - [AppE "nth" - [] - [VarE "file", - PrimAppE AddP - [VarE "index", - LitE 1]]], - DataConE (MetaTv $148) - "Cons" - [DataConE (MetaTv $149) - "Str" - [VarE "word"], - VarE "plist_inline"], - PrimAppE AddP - [VarE "index", - LitE 2], - VarE "max_len"]) - (AppE "fileToContent" - [] - [VarE "file", - AppE "append" - [] - [VarE "word", - VarE "char_vec"], - VarE "plist_inline", - PrimAppE AddP - [VarE "index", - LitE 1], - VarE "max_len"]))))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (searchBlogContent, - FunDef {funName = "searchBlogContent", - funArgs = [keyword,content], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "BlogContent" []] - BoolTy), - funBody = CaseE (VarE "content") - [("Content", - [(block, MetaTv $141)], - AppE "isKeywordPresentInBlock" - [] - [VarE "keyword", - VarE "block"])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (emphasizeBlogContent, - FunDef {funName = "emphasizeBlogContent", - funArgs = [keyword,oldContent], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "BlogContent" []] - (PackedTy "BlogContent" - [])), - funBody = CaseE (VarE "oldContent") - [("Content", - [(block, MetaTv $138)], - DataConE (MetaTv $137) - "Content" - [AppE "emphasizeKeywordInBlock" - [] - [VarE "keyword", - VarE "block"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (emphasizeBlogContent', - FunDef {funName = "emphasizeBlogContent'", - funArgs = [keyword,oldContent], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "BlogContent" []] - (PackedTy "BlogContent" - [])), - funBody = CaseE (VarE "oldContent") - [("Content", - [(block, MetaTv $134)], - DataConE (MetaTv $133) - "Content" - [AppE "emphasizeKeywordInBlock" - [] - [VarE "keyword", - VarE "block"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (insertBlogTags, - FunDef {funName = "insertBlogTags", - funArgs = [keyword,tags], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "BlogTags" []] - (PackedTy "BlogTags" [])), - funBody = CaseE (VarE "tags") - [("TagList", - [(list, MetaTv $130)], - DataConE (MetaTv $129) - "TagList" - [AppE "insertTagList" - [] - [VarE "keyword", - VarE "list"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (deleteBlogTags, - FunDef {funName = "deleteBlogTags", - funArgs = [keyword,tags], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "BlogTags" []] - (PackedTy "BlogTags" [])), - funBody = CaseE (VarE "tags") - [("TagList", - [(list, MetaTv $126)], - DataConE (MetaTv $125) - "TagList" - [AppE "deleteTagList" - [] - [VarE "keyword", - VarE "list"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (searchBlogTags, - FunDef {funName = "searchBlogTags", - funArgs = [keyword,tags], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "BlogTags" []] - BoolTy), - funBody = CaseE (VarE "tags") - [("TagList", - [(list, MetaTv $122)], - AppE "searchTagList" - [] - [VarE "keyword", - VarE "list"])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (emphasizeKeywordInBlockList, - FunDef {funName = "emphasizeKeywordInBlockList", - funArgs = [keyword,block_list], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "PList" - [PackedTy "Block" - []]] - (PackedTy "PList" - [PackedTy "Block" - []])), - funBody = CaseE (VarE "block_list") - [("Nil", - [], - DataConE (MetaTv $114) "Nil" []), - ("Cons", - [(block, MetaTv $118), - (rst, MetaTv $119)], - LetE (newBlock, - [], - MetaTv $117, - AppE "emphasizeKeywordInBlock" - [] - [VarE "keyword", - VarE "block"]) - (LetE (rst', - [], - MetaTv $116, - AppE "emphasizeKeywordInBlockList" - [] - [VarE "keyword", - VarE "rst"]) - (DataConE (MetaTv $115) - "Cons" - [VarE "newBlock", - VarE "rst'"])))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (emphasizeInlineListForKeyword, - FunDef {funName = "emphasizeInlineListForKeyword", - funArgs = [keyword,inline_list], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "PList" - [PackedTy "Inline" - []]] - (PackedTy "PList" - [PackedTy "Inline" - []])), - funBody = CaseE (VarE "inline_list") - [("Nil", - [], - DataConE (MetaTv $106) "Nil" []), - ("Cons", - [(inline, MetaTv $110), - (rst, MetaTv $111)], - LetE (newinline, - [], - MetaTv $109, - AppE "emphasizeKeywordInline" - [] - [VarE "keyword", - VarE "inline"]) - (LetE (rst', - [], - MetaTv $108, - AppE "emphasizeInlineListForKeyword" - [] - [VarE "keyword", - VarE "rst"]) - (DataConE (MetaTv $107) - "Cons" - [VarE "newinline", - VarE "rst'"])))], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (emphasizeKeywordInline, - FunDef {funName = "emphasizeKeywordInline", - funArgs = [keyword,inline], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "Inline" []] - (PackedTy "Inline" [])), - funBody = CaseE (VarE "inline") - [("Str", - [(text, MetaTv $100)], - LetE (isSame, - [], - MetaTv $99, - AppE "compareWord" - [] - [VarE "keyword", - VarE "text"]) - (IfE (VarE "isSame") - (LetE (newlist, - [], - PackedTy "PList" - [PackedTy "Inline" - []], - DataConE (MetaTv $96) - "Cons" - [Ext (CopyPacked (MetaTv $97) - (VarE "inline")), - DataConE (MetaTv $98) - "Nil" - []]) - (DataConE (MetaTv $95) - "Emph" - [VarE "newlist"])) - (VarE "inline"))), - ("Emph", - [(list_inline, MetaTv $102)], - DataConE (MetaTv $101) - "Emph" - [AppE "emphasizeInlineListForKeyword" - [] - [VarE "keyword", - VarE "list_inline"]]), - ("Space", - [], - DataConE (MetaTv $103) - "Space" - [])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (searchInlineListForKeyword, - FunDef {funName = "searchInlineListForKeyword", - funArgs = [keyword,inline_list], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "PList" - [PackedTy "Inline" - []]] - BoolTy), - funBody = CaseE (VarE "inline_list") - [("Nil", [], PrimAppE MkFalse []), - ("Cons", - [(inline, MetaTv $86), - (rst, MetaTv $87)], - PrimAppE OrP - [AppE "isKeywordPresentInline" - [] - [VarE "keyword", - VarE "inline"], - AppE "searchInlineListForKeyword" - [] - [VarE "keyword", - VarE "rst"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (searchBlockListForKeyword, - FunDef {funName = "searchBlockListForKeyword", - funArgs = [keyword,block_list], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "PList" - [PackedTy "Block" - []]] - BoolTy), - funBody = CaseE (VarE "block_list") - [("Nil", [], PrimAppE MkFalse []), - ("Cons", - [(block, MetaTv $82), - (rst, MetaTv $83)], - PrimAppE OrP - [AppE "isKeywordPresentInBlock" - [] - [VarE "keyword", - VarE "block"], - AppE "searchBlockListForKeyword" - [] - [VarE "keyword", - VarE "rst"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (isKeywordPresentInline, - FunDef {funName = "isKeywordPresentInline", - funArgs = [keyword,inline], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "Inline" []] - BoolTy), - funBody = CaseE (VarE "inline") - [("Str", - [(text, MetaTv $78)], - AppE "compareWord" - [] - [VarE "keyword", - VarE "text"]), - ("Emph", - [(list_inline, MetaTv $79)], - AppE "searchInlineListForKeyword" - [] - [VarE "keyword", - VarE "list_inline"]), - ("Space", - [], - PrimAppE MkFalse [])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (isKeywordPresentInBlock, - FunDef {funName = "isKeywordPresentInBlock", - funArgs = [keyword,contentBlock], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "Block" []] - BoolTy), - funBody = CaseE (VarE "contentBlock") - [("Plain", - [(list_inline, MetaTv $75)], - AppE "searchInlineListForKeyword" - [] - [VarE "keyword", - VarE "list_inline"]), - ("Null", - [], - PrimAppE MkFalse [])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (insertTagList, - FunDef {funName = "insertTagList", - funArgs = [keyword,taglist], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "PList" - [VectorTy CharTy]] - (PackedTy "PList" - [VectorTy CharTy])), - funBody = CaseE (VarE "taglist") - [("Nil", - [], - DataConE (MetaTv $69) - "Cons" - [VarE "keyword", - DataConE (MetaTv $70) - "Nil" - []]), - ("Cons", - [(word, MetaTv $71), - (rst, MetaTv $72)], - AppE "insertTagList" - [] - [VarE "keyword", - VarE "rst"])], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (deleteTagList, - FunDef {funName = "deleteTagList", - funArgs = [keyword,taglist], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "PList" - [VectorTy CharTy]] - (PackedTy "PList" - [VectorTy CharTy])), - funBody = CaseE (VarE "taglist") - [("Nil", - [], - DataConE (MetaTv $63) "Nil" []), - ("Cons", - [(word, MetaTv $65), - (rst, MetaTv $66)], - IfE (AppE "compareWord" - [] - [VarE "keyword", - VarE "word"]) - (AppE "deleteTagList" - [] - [VarE "keyword", - VarE "rst"]) - (DataConE (MetaTv $64) - "Cons" - [VarE "word", - AppE "deleteTagList" - [] - [VarE "keyword", - VarE "rst"]]))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (searchTagList, - FunDef {funName = "searchTagList", - funArgs = [keyword,taglist], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "PList" - [VectorTy CharTy]] - BoolTy), - funBody = CaseE (VarE "taglist") - [("Nil", [], PrimAppE MkFalse []), - ("Cons", - [(word, MetaTv $59), - (rst, MetaTv $60)], - PrimAppE OrP - [AppE "compareWord" - [] - [VarE "keyword", - VarE "word"], - AppE "searchTagList" - [] - [VarE "keyword", - VarE "rst"]])], - funMeta = FunMeta {funRec = NotRec, - funInline = Inline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (cmp, - FunDef {funName = "cmp", - funArgs = [start,end,word1,word2], - funTy = ForAll [] - (ArrowTy [IntTy,IntTy, - VectorTy CharTy, - VectorTy CharTy] - BoolTy), - funBody = IfE (PrimAppE LtP - [VarE "start",VarE "end"]) - (LetE (a, - [], - MetaTv $56, - AppE "nth" - [] - [VarE "word1", - VarE "start"]) - (LetE (b, - [], - MetaTv $55, - AppE "nth" - [] - [VarE "word2", - VarE "start"]) - (LetE (eq, - [], - MetaTv $54, - IfE (PrimAppE EqCharP - [VarE "a", - VarE "b"]) - (PrimAppE MkTrue - []) - (PrimAppE MkFalse - [])) - (LetE (recurse, - [], - MetaTv $53, - AppE "cmp" - [] - [PrimAppE AddP - [VarE "start", - LitE 1], - VarE "end", - VarE "word1", - VarE "word2"]) - (PrimAppE AndP - [VarE "eq", - VarE "recurse"]))))) - (PrimAppE MkTrue []), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (compareWord, - FunDef {funName = "compareWord", - funArgs = [word1,word2], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - VectorTy CharTy] - BoolTy), - funBody = LetE (len1, - [], - MetaTv $48, - AppE "length" [] [VarE "word1"]) - (LetE (len2, - [], - MetaTv $47, - AppE "length" - [] - [VarE "word2"]) - (LetE (compare_len, - [], - MetaTv $46, - IfE (PrimAppE EqIntP - [VarE "len1", - VarE "len2"]) - (PrimAppE MkTrue - []) - (PrimAppE MkFalse - [])) - (IfE (VarE "compare_len") - (AppE "cmp" - [] - [LitE 0, - VarE "len1", - VarE "word1", - VarE "word2"]) - (PrimAppE MkFalse - [])))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (checkBlogID, - FunDef {funName = "checkBlogID", - funArgs = [id,val], - funTy = ForAll [] - (ArrowTy [PackedTy "BlogId" [], - IntTy] - BoolTy), - funBody = CaseE (VarE "id") - [("ID", - [(x, MetaTv $43)], - IfE (PrimAppE EqIntP - [VarE "x", - VarE "val"]) - (PrimAppE MkTrue []) - (PrimAppE MkFalse []))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkListFiles, - FunDef {funName = "mkListFiles", - funArgs = [f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,len], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy,IntTy] - (PackedTy "PList" - [VectorTy CharTy])), - funBody = IfE (PrimAppE LtP [VarE "len",LitE 0]) - (DataConE (MetaTv $37) "Nil" []) - (LetE (f, - [], - MetaTv $40, - AppE "getFile" - [] - [VarE "f1",VarE "f2", - VarE "f3",VarE "f4", - VarE "f5",VarE "f6", - VarE "f7",VarE "f8", - VarE "f9",VarE "f10", - VarE "len"]) - (LetE (rst, - [], - MetaTv $39, - AppE "mkListFiles" - [] - [VarE "f1", - VarE "f2", - VarE "f3", - VarE "f4", - VarE "f5", - VarE "f6", - VarE "f7", - VarE "f8", - VarE "f9", - VarE "f10", - PrimAppE SubP - [VarE "len", - LitE 1]]) - (DataConE (MetaTv $38) - "Cons" - [VarE "f", - VarE "rst"]))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (getFile, - FunDef {funName = "getFile", - funArgs = [f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,select], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy, - VectorTy CharTy,IntTy] - (VectorTy CharTy)), - funBody = IfE (PrimAppE EqIntP - [VarE "select",LitE 0]) - (VarE "f1") - (IfE (PrimAppE EqIntP - [VarE "select", - LitE 1]) - (VarE "f2") - (IfE (PrimAppE EqIntP - [VarE "select", - LitE 2]) - (VarE "f3") - (IfE (PrimAppE EqIntP - [VarE "select", - LitE 3]) - (VarE "f4") - (IfE (PrimAppE EqIntP - [VarE "select", - LitE 4]) - (VarE "f5") - (IfE (PrimAppE EqIntP - [VarE "select", - LitE 5]) - (VarE "f6") - (IfE (PrimAppE EqIntP - [VarE "select", - LitE 6]) - (VarE "f7") - (IfE (PrimAppE EqIntP - [VarE "select", - LitE 7]) - (VarE "f8") - (IfE (PrimAppE EqIntP - [VarE "select", - LitE 8]) - (VarE "f9") - (VarE "f10"))))))))), - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkBlogTags, - FunDef {funName = "mkBlogTags", - funArgs = [taglist], - funTy = ForAll [] - (ArrowTy [PackedTy "PList" - [VectorTy CharTy]] - (PackedTy "BlogTags" [])), - funBody = DataConE (MetaTv $14) - "TagList" - [VarE "taglist"], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkBlogContent, - FunDef {funName = "mkBlogContent", - funArgs = [block], - funTy = ForAll [] - (ArrowTy [PackedTy "Block" []] - (PackedTy "BlogContent" - [])), - funBody = DataConE (MetaTv $12) - "Content" - [VarE "block"], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkBlogDate, - FunDef {funName = "mkBlogDate", - funArgs = [text], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy] - (PackedTy "BlogDate" [])), - funBody = DataConE (MetaTv $10) - "Date" - [VarE "text"], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkBlogAuthor, - FunDef {funName = "mkBlogAuthor", - funArgs = [text], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy] - (PackedTy "BlogAuthor" - [])), - funBody = DataConE (MetaTv $8) - "Author" - [VarE "text"], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkBlogID, - FunDef {funName = "mkBlogID", - funArgs = [val], - funTy = ForAll [] - (ArrowTy [IntTy] - (PackedTy "BlogId" [])), - funBody = DataConE (MetaTv $6) "ID" [VarE "val"], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkBlogHeader, - FunDef {funName = "mkBlogHeader", - funArgs = [text], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy] - (PackedTy "BlogHeader" - [])), - funBody = DataConE (MetaTv $4) - "Header" - [VarE "text"], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (getRandomString, - FunDef {funName = "getRandomString", - funArgs = [length], - funTy = ForAll [] - (ArrowTy [IntTy] (VectorTy CharTy)), - funBody = AppE "generate" - [] - [VarE "length",VarE "mkChar"], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}}), - (mkChar, - FunDef {funName = "mkChar", - funArgs = [val], - funTy = ForAll [] (ArrowTy [IntTy] CharTy), - funBody = AppE "getChar" - [] - [PrimAppE ModP - [PrimAppE RandP [], - LitE 26]], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}})], - mainExp = Nothing}) - [ImportDecl {importAnn = SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 4 1 4 22, srcInfoPoints = [SrcSpan ".hs" 4 1 4 7]}, importModule = ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 4 8 4 22, srcInfoPoints = []}) "Gibbon.Prelude", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}, - ImportDecl {importAnn = SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 5 1 5 20, srcInfoPoints = [SrcSpan ".hs" 5 1 5 7]}, importModule = ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 5 8 5 20, srcInfoPoints = []}) "Gibbon.PList", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}, - ImportDecl {importAnn = SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 6 1 6 21, srcInfoPoints = [SrcSpan ".hs" 6 1 6 7]}, importModule = ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 6 8 6 21, srcInfoPoints = []}) "Gibbon.Vector", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}]] - (ProgModule "Main" - (Prog - {ddefs = [], - fundefs = [(emphKeywordInContent, - FunDef {funName = "emphKeywordInContent", - funArgs = [keyword,blogs], - funTy = ForAll [] - (ArrowTy [VectorTy CharTy, - PackedTy "Blog" []] - (PackedTy "Blog" [])), - funBody = CaseE (VarE "blogs") - [("End", - [], - DataConE (MetaTv $2) "End" []), - ("Layout1", - [(header, MetaTv $8), - (id, MetaTv $9), - (author, MetaTv $10), - (date, MetaTv $11), - (content, MetaTv $12), - (tags, MetaTv $13), - (rst, MetaTv $14)], - LetE (newContent, - [], - MetaTv $7, - CaseE (VarE "content") - [("Content", - [(block, - MetaTv $6)], - DataConE (MetaTv $5) - "Content" - [AppE "emphasizeKeywordInBlock" - [] - [VarE "keyword", - VarE "block"]])]) - (LetE (newRst, - [], - MetaTv $4, - AppE "emphKeywordInContent" - [] - [VarE "keyword", - VarE "rst"]) - (DataConE (MetaTv $3) - "Layout1" - [VarE "header", - VarE "id", - VarE "author", - VarE "date", - VarE "newContent", - VarE "tags", - VarE "newRst"])))], - funMeta = FunMeta {funRec = NotRec, - funInline = NoInline, - funCanTriggerGC = False, - funOptLayout = NoLayoutOpt, - userConstraintsDataCon = Nothing}})], - mainExp = Just (LetE (blogs, - [], - MetaTv $17, - AppE "mkBlogs_layout1" [] [LitE 2]) - (LetE (keyword, - [], - VectorTy CharTy, - LetE (vec16, - [], - VectorTy CharTy, - PrimAppE (VAllocP CharTy) [LitE 1]) - (LetE (_, - [], - VectorTy CharTy, - PrimAppE (InplaceVUpdateP CharTy) - [VarE "vec16",LitE 0, - CharE 'a']) - (VarE "vec16"))) - (LetE (newblgs, - [], - MetaTv $15, - AppE "emphKeywordInContent" - [] - [VarE "keyword",VarE "blogs"]) - (AppE "printBlog" - [] - [VarE "newblgs"]))), - MetaTv $18)}) - [ImportDecl {importAnn = SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 2 1 2 14, srcInfoPoints = [SrcSpan ".hs" 2 1 2 7]}, importModule = ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 2 8 2 14, srcInfoPoints = []}) "Basics", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}, - ImportDecl {importAnn = SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 3 1 3 23, srcInfoPoints = [SrcSpan ".hs" 3 1 3 7]}, importModule = ModuleName (SrcSpanInfo {srcInfoSpan = SrcSpan ".hs" 3 8 3 23, srcInfoPoints = []}) "GenerateLayout1", importQualified = False, importSrc = False, importSafe = False, importPkg = Nothing, importAs = Nothing, importSpecs = Nothing}]) - -Typechecked: -================================================================================ -data Inline130 = Str156 Vector Char | - Emph157 (Packed PList72 [(Packed Inline130 [])]) | - Space158 -data Block131 = Plain154 (Packed PList72 [(Packed Inline130 [])]) | - Null155 -data BlogHeader132 = Header153 Vector Char -data BlogId133 = ID152 Int -data BlogAuthor134 = Author151 Vector Char -data BlogDate135 = Date150 Vector Char -data BlogContent136 = Content149 (Packed Block131 []) -data BlogTags137 = TagList148 (Packed PList72 [Vector Char]) -data Blog138 = End139 | - Layout1140 (Packed BlogHeader132 []) (Packed BlogId133 []) (Packed BlogAuthor134 []) (Packed BlogDate135 []) (Packed BlogContent136 []) (Packed BlogTags137 []) (Packed Blog138 []) | - Layout2141 (Packed BlogContent136 []) (Packed BlogTags137 []) (Packed Blog138 []) (Packed BlogHeader132 []) (Packed BlogId133 []) (Packed BlogAuthor134 []) (Packed BlogDate135 []) | - Layout3142 (Packed BlogTags137 []) (Packed Blog138 []) (Packed BlogContent136 []) (Packed BlogHeader132 []) (Packed BlogId133 []) (Packed BlogAuthor134 []) (Packed BlogDate135 []) | - Layout4143 (Packed BlogTags137 []) (Packed BlogContent136 []) (Packed Blog138 []) (Packed BlogHeader132 []) (Packed BlogId133 []) (Packed BlogAuthor134 []) (Packed BlogDate135 []) | - Layout5144 (Packed Blog138 []) (Packed BlogTags137 []) (Packed BlogContent136 []) (Packed BlogHeader132 []) (Packed BlogId133 []) (Packed BlogAuthor134 []) (Packed BlogDate135 []) | - Layout6145 (Packed BlogHeader132 []) (Packed BlogId133 []) (Packed BlogAuthor134 []) (Packed BlogDate135 []) (Packed BlogContent136 []) (Packed Blog138 []) (Packed BlogTags137 []) | - Layout7146 (Packed Blog138 []) (Packed BlogContent136 []) (Packed BlogHeader132 []) (Packed BlogId133 []) (Packed BlogAuthor134 []) (Packed BlogDate135 []) (Packed BlogTags137 []) | - Layout8147 (Packed BlogContent136 []) (Packed Blog138 []) (Packed BlogId133 []) (Packed BlogAuthor134 []) (Packed BlogDate135 []) (Packed BlogHeader132 []) (Packed BlogTags137 []) -data PList72 b:a164 = Nil73 | - Cons74 b:a164 (Packed PList72 [b:a164]) -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkBlogs_layout11 :: forall. (Int -> (Packed Blog138 [])) -mkBlogs_layout11 length165 = - if <=(length165, 0) - then (End139 ()) - else let header166 :: (Packed BlogHeader132 []) = (Header153 () (getRandomString128 [] 5)) in - let id167 :: (Packed BlogId133 []) = (ID152 () 10 - length165 mod 10) in - let author168 :: (Packed BlogAuthor134 []) = (Author151 () (getRandomString128 [] 5)) in - let date169 :: (Packed BlogDate135 []) = (Date150 () (getRandomString128 [] 5)) in - let content170 :: (Packed BlogContent136 []) = (Content149 () (Plain154 () (mkRandomInlineList91 [] 50))) in - let tags171 :: (Packed BlogTags137 []) = (TagList148 () (mkSomeTags90 [] 10)) in - let rst172 :: (Packed Blog138 []) = (mkBlogs_layout11 [] length165 - 1) in - (Layout1140 () header166 id167 author168 date169 content170 tags171 rst172) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -emphKeywordInContent0 :: forall. (Vector Char -> (Packed Blog138 []) -> (Packed Blog138 [])) -emphKeywordInContent0 keyword173 blogs174 = - case blogs174 of - End139 -> - (End139 ()) - Layout1140 header175::(Packed BlogHeader132 []) id176::(Packed BlogId133 []) author177::(Packed BlogAuthor134 []) date178::(Packed BlogDate135 []) content179::(Packed BlogContent136 []) tags180::(Packed BlogTags137 []) rst181::(Packed Blog138 []) -> - let newContent183 :: (Packed BlogContent136 []) = case content179 of - Content149 block182::(Packed Block131 []) -> - (Content149 () (emphasizeKeywordInBlock75 [] keyword173 block182)) in - let newRst184 :: (Packed Blog138 []) = (emphKeywordInContent0 [] keyword173 rst181) in - (Layout1140 () header175 id176 author177 date178 newContent183 tags180 newRst184) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printBlog76 :: forall. ((Packed Blog138 []) -> ()) -printBlog76 blog185 = - case blog185 of - Layout1140 header186::(Packed BlogHeader132 []) id187::(Packed BlogId133 []) author188::(Packed BlogAuthor134 []) date189::(Packed BlogDate135 []) content190::(Packed BlogContent136 []) tags191::(Packed BlogTags137 []) rst192::(Packed Blog138 []) -> - let wildcard_344193 :: () = printsym("Layout1 ") in - let wildcard_342194 :: () = (printHeader83 [] header186) in - let wildcard_340195 :: () = (printID82 [] id187) in - let wildcard_338196 :: () = (printAuthor84 [] author188) in - let wildcard_336197 :: () = (printDate85 [] date189) in - let wildcard_334198 :: () = (printContent87 [] content190) in - let wildcard_332199 :: () = (printTagList86 [] tags191) in - let wildcard_330200 :: () = (printBlog76 [] rst192) in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -emphasizeKeywordInBlock75 :: forall. (Vector Char -> (Packed Block131 []) -> (Packed Block131 [])) -emphasizeKeywordInBlock75 keyword201 contentBlock202 = - case contentBlock202 of - Plain154 list_inline203::(Packed PList72 [(Packed Inline130 [])]) -> - (Plain154 () (emphasizeInlineListForKeyword108 [] keyword201 list_inline203)) - Null155 -> - (Null155 ()) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -getChar77 :: forall. (Int -> Char) -getChar77 decimal204 = - if decimal204 == 0 - then 'a' - else if decimal204 == 1 - then 'b' - else if decimal204 == 2 - then 'c' - else if decimal204 == 3 - then 'd' - else if decimal204 == 4 - then 'e' - else if decimal204 == 5 - then 'f' - else if decimal204 == 6 - then 'g' - else if decimal204 == 7 - then 'h' - else if decimal204 == 8 - then 'i' - else if decimal204 == 9 - then 'j' - else if decimal204 == 10 - then 'k' - else if decimal204 == 11 - then 'l' - else if decimal204 == 12 - then 'm' - else if decimal204 == 13 - then 'n' - else if decimal204 == 14 - then 'o' - else if decimal204 == 15 - then 'p' - else if decimal204 == 16 - then 'q' - else if decimal204 == 17 - then 'r' - else if decimal204 == 18 - then 's' - else if decimal204 == 19 - then 't' - else if decimal204 == 20 - then 'u' - else if decimal204 == 21 - then 'v' - else if decimal204 == 22 - then 'w' - else if decimal204 == 23 - then 'x' - else if decimal204 == 24 - then 'y' - else 'z' - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printInline78 :: forall. ((Packed Inline130 []) -> ()) -printInline78 inline205 = - case inline205 of - Str156 text206::Vector Char -> - let wildcard_392207 :: () = printsym("Str ") in - let wildcard_390209 :: () = (printVec9 [Char] (\(i208 :: Char) -> - printchar(i208)) text206) in - () - Emph157 plist210::(Packed PList72 [(Packed Inline130 [])]) -> - let wildcard_397211 :: () = printsym("Emph ") in - let wildcard_395212 :: () = (printPlistInline80 [] plist210) in - () - Space158 -> - let wildcard_400213 :: () = printsym("Space ") in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printPlistText79 :: forall. ((Packed PList72 [Vector Char]) -> ()) -printPlistText79 list214 = - case list214 of - Cons74 x215::Vector Char rst216::(Packed PList72 [Vector Char]) -> - let wildcard_382217 :: () = printsym("PList ( Cons ") in - let wildcard_380219 :: () = (printVec9 [Char] (\(i218 :: Char) -> - printchar(i218)) x215) in - let wildcard_377220 :: () = (printPlistText79 [] rst216) in - let wildcard_375221 :: () = printsym(" ) ") in - () - Nil73 -> - let wildcard_386222 :: () = printsym("Nil") in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printPlistInline80 :: forall. ((Packed PList72 [(Packed Inline130 [])]) -> ()) -printPlistInline80 list223 = - case list223 of - Cons74 x224::(Packed Inline130 []) rst225::(Packed PList72 [(Packed Inline130 [])]) -> - let wildcard_368226 :: () = printsym("PList ( Cons ") in - let wildcard_366227 :: () = (printInline78 [] x224) in - let wildcard_364228 :: () = (printPlistInline80 [] rst225) in - let wildcard_362229 :: () = printsym(" ) ") in - () - Nil73 -> - let wildcard_372230 :: () = printsym("Nil") in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printBlock81 :: forall. ((Packed Block131 []) -> ()) -printBlock81 block231 = - case block231 of - Plain154 plist232::(Packed PList72 [(Packed Inline130 [])]) -> - let wildcard_356233 :: () = printsym("Plain ") in - let wildcard_354234 :: () = (printPlistInline80 [] plist232) in - () - Null155 -> - let wildcard_359235 :: () = printsym("Null") in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printID82 :: forall. ((Packed BlogId133 []) -> ()) -printID82 id236 = - case id236 of - ID152 val237::Int -> - let wildcard_326238 :: () = printsym("ID ") in - let wildcard_324239 :: () = printint(val237) in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printHeader83 :: forall. ((Packed BlogHeader132 []) -> ()) -printHeader83 header240 = - case header240 of - Header153 str241::Vector Char -> - let wildcard_320242 :: () = printsym("Header ") in - let wildcard_318244 :: () = (printVec9 [Char] (\(i243 :: Char) -> - printchar(i243)) str241) in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printAuthor84 :: forall. ((Packed BlogAuthor134 []) -> ()) -printAuthor84 date245 = - case date245 of - Author151 str246::Vector Char -> - let wildcard_313247 :: () = printsym("Author ") in - let wildcard_311249 :: () = (printVec9 [Char] (\(i248 :: Char) -> - printchar(i248)) str246) in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printDate85 :: forall. ((Packed BlogDate135 []) -> ()) -printDate85 date250 = - case date250 of - Date150 str251::Vector Char -> - let wildcard_306252 :: () = printsym("Date ") in - let wildcard_304254 :: () = (printVec9 [Char] (\(i253 :: Char) -> - printchar(i253)) str251) in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printTagList86 :: forall. ((Packed BlogTags137 []) -> ()) -printTagList86 tags255 = - case tags255 of - TagList148 plist256::(Packed PList72 [Vector Char]) -> - let wildcard_299257 :: () = printsym("TagList ") in - let wildcard_297258 :: () = (printPlistText79 [] plist256) in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printContent87 :: forall. ((Packed BlogContent136 []) -> ()) -printContent87 content259 = - case content259 of - Content149 block260::(Packed Block131 []) -> - let wildcard_293261 :: () = printsym("Content ") in - let wildcard_291262 :: () = (printBlock81 [] block260) in - () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -blogLength88 :: forall. ((Packed Blog138 []) -> Int) -blogLength88 blog263 = - case blog263 of - End139 -> - 0 - Layout1140 a264::(Packed BlogHeader132 []) b265::(Packed BlogId133 []) c266::(Packed BlogAuthor134 []) d267::(Packed BlogDate135 []) e268::(Packed BlogContent136 []) f269::(Packed BlogTags137 []) rst270::(Packed Blog138 []) -> - 1 + (blogLength88 [] rst270) - Layout2141 a271::(Packed BlogContent136 []) b272::(Packed BlogTags137 []) rst273::(Packed Blog138 []) c274::(Packed BlogHeader132 []) d275::(Packed BlogId133 []) e276::(Packed BlogAuthor134 []) f277::(Packed BlogDate135 []) -> - 1 + (blogLength88 [] rst273) - Layout3142 a278::(Packed BlogTags137 []) rst279::(Packed Blog138 []) b280::(Packed BlogContent136 []) c281::(Packed BlogHeader132 []) d282::(Packed BlogId133 []) e283::(Packed BlogAuthor134 []) f284::(Packed BlogDate135 []) -> - 1 + (blogLength88 [] rst279) - Layout4143 a285::(Packed BlogTags137 []) b286::(Packed BlogContent136 []) rst287::(Packed Blog138 []) d288::(Packed BlogHeader132 []) e289::(Packed BlogId133 []) f290::(Packed BlogAuthor134 []) g291::(Packed BlogDate135 []) -> - 1 + (blogLength88 [] rst287) - Layout5144 rst292::(Packed Blog138 []) a293::(Packed BlogTags137 []) b294::(Packed BlogContent136 []) c295::(Packed BlogHeader132 []) d296::(Packed BlogId133 []) e297::(Packed BlogAuthor134 []) f298::(Packed BlogDate135 []) -> - 1 + (blogLength88 [] rst292) - Layout6145 a299::(Packed BlogHeader132 []) b300::(Packed BlogId133 []) c301::(Packed BlogAuthor134 []) d302::(Packed BlogDate135 []) e303::(Packed BlogContent136 []) rst304::(Packed Blog138 []) f305::(Packed BlogTags137 []) -> - 1 + (blogLength88 [] rst304) - Layout7146 rst306::(Packed Blog138 []) a307::(Packed BlogContent136 []) b308::(Packed BlogHeader132 []) c309::(Packed BlogId133 []) d310::(Packed BlogAuthor134 []) e311::(Packed BlogDate135 []) f312::(Packed BlogTags137 []) -> - 1 + (blogLength88 [] rst306) - Layout8147 a313::(Packed BlogContent136 []) rst314::(Packed Blog138 []) b315::(Packed BlogId133 []) c316::(Packed BlogAuthor134 []) d317::(Packed BlogDate135 []) e318::(Packed BlogHeader132 []) f319::(Packed BlogTags137 []) -> - 1 + (blogLength88 [] rst314) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkBlockList89 :: forall. (Int -> Int -> (Packed PList72 [(Packed Block131 [])])) -mkBlockList89 length320 base321 = - if <=(length320, 0) - then (Nil73 ((Packed Block131 []))) - else if base321 == 0 - then let item322 :: (Packed Block131 []) = (Plain154 () (mkInlineList93 [] 1000 1)) in - let rst323 :: (Packed PList72 [(Packed Block131 [])]) = (mkBlockList89 [] length320 - 1 base321) in - (Cons74 ((Packed Block131 [])) item322 rst323) - else let item324 :: (Packed Block131 []) = (Null155 ()) in - let rst325 :: (Packed PList72 [(Packed Block131 [])]) = (mkBlockList89 [] length320 - 1 base321) in - (Cons74 ((Packed Block131 [])) item324 rst325) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkSomeTags90 :: forall. (Int -> (Packed PList72 [Vector Char])) -mkSomeTags90 len326 = - if <=(len326, 0) - then (Nil73 (Vector Char)) - else let word329 :: Vector Char = let vec220327 :: Vector Char = (valloc :: [Char])(1) in - let _328 :: Vector Char = inplacevupdate(vec220327, 0, 'a') in - vec220327 in - let rst330 :: (Packed PList72 [Vector Char]) = (mkSomeTags90 [] len326 - 1) in - (Cons74 (Vector Char) word329 rst330) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkRandomInlineList91 :: forall. (Int -> (Packed PList72 [(Packed Inline130 [])])) -mkRandomInlineList91 len331 = - if <=(len331, 0) - then (Nil73 ((Packed Inline130 []))) - else let word332 :: (Packed Inline130 []) = (Str156 () (getRandomString128 [] 1)) in - let rst333 :: (Packed PList72 [(Packed Inline130 [])]) = (mkRandomInlineList91 [] len331 - 1) in - (Cons74 ((Packed Inline130 [])) word332 rst333) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkInlineList_92 :: forall. (Int -> Int -> Vector Vector Char -> (Packed PList72 [(Packed Inline130 [])])) -mkInlineList_92 length334 index335 words336 = - if >=(index335, length334) - then (Nil73 ((Packed Inline130 []))) - else let item337 :: (Packed Inline130 []) = (Str156 () (nth5 [Vector Char] words336 index335)) in - let rst338 :: (Packed PList72 [(Packed Inline130 [])]) = (mkInlineList_92 [] length334 index335 + 1 words336) in - (Cons74 ((Packed Inline130 [])) item337 rst338) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkInlineList93 :: forall. (Int -> Int -> (Packed PList72 [(Packed Inline130 [])])) -mkInlineList93 length339 base340 = - if <=(length339, 0) - then (Nil73 ((Packed Inline130 []))) - else if base340 == 0 - then let item341 :: (Packed Inline130 []) = (Emph157 () (mkInlineList93 [] 100 1)) in - let rst342 :: (Packed PList72 [(Packed Inline130 [])]) = (mkInlineList93 [] length339 - 1 base340) in - (Cons74 ((Packed Inline130 [])) item341 rst342) - else let item343 :: (Packed Inline130 []) = (mkInlineBaseCase94 [] rand() mod 4) in - let rst344 :: (Packed PList72 [(Packed Inline130 [])]) = (mkInlineList93 [] length339 - 1 base340) in - (Cons74 ((Packed Inline130 [])) item343 rst344) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkInlineBaseCase94 :: forall. (Int -> (Packed Inline130 [])) -mkInlineBaseCase94 option345 = - if option345 == 0 - then (Str156 () (getRandomString128 [] 5)) - else (Space158 ()) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkContentFromText95 :: forall. (Vector Char -> (Packed BlogContent136 [])) -mkContentFromText95 f346 = - let block347 :: (Packed Block131 []) = (fileToContent100 [] f346 (singleton6 [Char] (nth5 [Char] f346 0)) (Nil73 ((Packed Inline130 []))) 1 vlength(f346)) in - let content348 :: (Packed BlogContent136 []) = (mkBlogContent123 [] block347) in - content348 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkTagsFromText96 :: forall. (Vector Char -> (Packed BlogTags137 [])) -mkTagsFromText96 f_349 = - let tags350 :: (Packed PList72 [Vector Char]) = (fileToTags97 [] f_349 (singleton6 [Char] (nth5 [Char] f_349 0)) 1 vlength(f_349)) in - let tags_351 :: (Packed BlogTags137 []) = (TagList148 () tags350) in - tags_351 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -fileToTags97 :: forall. (Vector Char -> Vector Char -> Int -> Int -> (Packed PList72 [Vector Char])) -fileToTags97 file352 word353 index354 max_len355 = - if >=(index354, max_len355) - then (Nil73 (Vector Char)) - else let character356 :: Char = (nth5 [Char] file352 index354) in - let isSpace359 :: Bool = if *==*(character356, (head8 [Char] let vec177357 :: Vector Char = (valloc :: [Char])(1) in - let _358 :: Vector Char = inplacevupdate(vec177357, 0, ' ') in - vec177357)) - then True - else False in - let char_vec360 :: Vector Char = (singleton6 [Char] character356) in - if isSpace359 - then (Cons74 (Vector Char) word353 (fileToTags97 [] file352 (singleton6 [Char] (nth5 [Char] file352 index354 + 1)) index354 + 2 max_len355)) - else (fileToTags97 [] file352 (append7 [Char] word353 char_vec360) index354 + 1 max_len355) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printWordList98 :: forall. (Vector Vector Char -> Int -> Int -> ()) -printWordList98 vec361 start362 end363 = - if start362 < end363 - then let element364 :: Vector Char = (nth5 [Vector Char] vec361 start362) in - let wildcard_167366 :: () = (printVec9 [Char] (\(i365 :: Char) -> - printchar(i365)) element364) in - (printWordList98 [] vec361 start362 + 1 end363) - else () - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -fileToContent_99 :: forall. (Vector Char -> Vector Char -> Vector Vector Char -> Int -> Int -> Vector Vector Char) -fileToContent_99 file367 word368 running_list369 index370 max_len371 = - if >=(index370, max_len371) - then (append7 [Vector Char] running_list369 (valloc :: [Vector Char])(0)) - else let character372 :: Char = (nth5 [Char] file367 index370) in - let isSpace375 :: Bool = if *==*(character372, (head8 [Char] let vec161373 :: Vector Char = (valloc :: [Char])(1) in - let _374 :: Vector Char = inplacevupdate(vec161373, 0, ' ') in - vec161373)) - then True - else False in - let char_vec376 :: Vector Char = (singleton6 [Char] character372) in - if isSpace375 - then (fileToContent_99 [] file367 (singleton6 [Char] (nth5 [Char] file367 index370 + 1)) (append7 [Vector Char] running_list369 (generate2 [Vector Char] 1 (\(i377 :: Int) -> - word368))) index370 + 2 max_len371) - else (fileToContent_99 [] file367 (append7 [Char] word368 char_vec376) running_list369 index370 + 1 max_len371) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -fileToContent100 :: forall. (Vector Char -> Vector Char -> (Packed PList72 [(Packed Inline130 [])]) -> Int -> Int -> (Packed Block131 [])) -fileToContent100 file378 word379 plist_inline380 index381 max_len382 = - if >=(index381, max_len382) - then (Plain154 () plist_inline380) - else let character383 :: Char = (nth5 [Char] file378 index381) in - let isSpace386 :: Bool = if *==*(character383, (head8 [Char] let vec151384 :: Vector Char = (valloc :: [Char])(1) in - let _385 :: Vector Char = inplacevupdate(vec151384, 0, ' ') in - vec151384)) - then True - else False in - let char_vec387 :: Vector Char = (singleton6 [Char] character383) in - if isSpace386 - then (fileToContent100 [] file378 (singleton6 [Char] (nth5 [Char] file378 index381 + 1)) (Cons74 ((Packed Inline130 [])) (Str156 () word379) plist_inline380) index381 + 2 max_len382) - else (fileToContent100 [] file378 (append7 [Char] word379 char_vec387) plist_inline380 index381 + 1 max_len382) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -searchBlogContent101 :: forall. (Vector Char -> (Packed BlogContent136 []) -> Bool) -searchBlogContent101 keyword388 content389 = - case content389 of - Content149 block390::(Packed Block131 []) -> - (isKeywordPresentInBlock113 [] keyword388 block390) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -emphasizeBlogContent102 :: forall. (Vector Char -> (Packed BlogContent136 []) -> (Packed BlogContent136 [])) -emphasizeBlogContent102 keyword391 oldContent392 = - case oldContent392 of - Content149 block393::(Packed Block131 []) -> - (Content149 () (emphasizeKeywordInBlock75 [] keyword391 block393)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -emphasizeBlogContent_103 :: forall. (Vector Char -> (Packed BlogContent136 []) -> (Packed BlogContent136 [])) -emphasizeBlogContent_103 keyword394 oldContent395 = - case oldContent395 of - Content149 block396::(Packed Block131 []) -> - (Content149 () (emphasizeKeywordInBlock75 [] keyword394 block396)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -insertBlogTags104 :: forall. (Vector Char -> (Packed BlogTags137 []) -> (Packed BlogTags137 [])) -insertBlogTags104 keyword397 tags398 = - case tags398 of - TagList148 list399::(Packed PList72 [Vector Char]) -> - (TagList148 () (insertTagList114 [] keyword397 list399)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -deleteBlogTags105 :: forall. (Vector Char -> (Packed BlogTags137 []) -> (Packed BlogTags137 [])) -deleteBlogTags105 keyword400 tags401 = - case tags401 of - TagList148 list402::(Packed PList72 [Vector Char]) -> - (TagList148 () (deleteTagList115 [] keyword400 list402)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -searchBlogTags106 :: forall. (Vector Char -> (Packed BlogTags137 []) -> Bool) -searchBlogTags106 keyword403 tags404 = - case tags404 of - TagList148 list405::(Packed PList72 [Vector Char]) -> - (searchTagList116 [] keyword403 list405) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -emphasizeKeywordInBlockList107 :: forall. (Vector Char -> (Packed PList72 [(Packed Block131 [])]) -> (Packed PList72 [(Packed Block131 [])])) -emphasizeKeywordInBlockList107 keyword406 block_list407 = - case block_list407 of - Nil73 -> - (Nil73 ((Packed Block131 []))) - Cons74 block408::(Packed Block131 []) rst409::(Packed PList72 [(Packed Block131 [])]) -> - let newBlock410 :: (Packed Block131 []) = (emphasizeKeywordInBlock75 [] keyword406 block408) in - let rst_411 :: (Packed PList72 [(Packed Block131 [])]) = (emphasizeKeywordInBlockList107 [] keyword406 rst409) in - (Cons74 ((Packed Block131 [])) newBlock410 rst_411) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -emphasizeInlineListForKeyword108 :: forall. (Vector Char -> (Packed PList72 [(Packed Inline130 [])]) -> (Packed PList72 [(Packed Inline130 [])])) -emphasizeInlineListForKeyword108 keyword412 inline_list413 = - case inline_list413 of - Nil73 -> - (Nil73 ((Packed Inline130 []))) - Cons74 inline414::(Packed Inline130 []) rst415::(Packed PList72 [(Packed Inline130 [])]) -> - let newinline416 :: (Packed Inline130 []) = (emphasizeKeywordInline109 [] keyword412 inline414) in - let rst_417 :: (Packed PList72 [(Packed Inline130 [])]) = (emphasizeInlineListForKeyword108 [] keyword412 rst415) in - (Cons74 ((Packed Inline130 [])) newinline416 rst_417) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -emphasizeKeywordInline109 :: forall. (Vector Char -> (Packed Inline130 []) -> (Packed Inline130 [])) -emphasizeKeywordInline109 keyword418 inline419 = - case inline419 of - Str156 text420::Vector Char -> - let isSame421 :: Bool = (compareWord118 [] keyword418 text420) in - if isSame421 - then let newlist422 :: (Packed PList72 [(Packed Inline130 [])]) = (Cons74 ((Packed Inline130 [])) copyPacked (inline419::(Packed Inline130 [])) (Nil73 ((Packed Inline130 [])))) in - (Emph157 () newlist422) - else inline419 - Emph157 list_inline423::(Packed PList72 [(Packed Inline130 [])]) -> - (Emph157 () (emphasizeInlineListForKeyword108 [] keyword418 list_inline423)) - Space158 -> - (Space158 ()) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -searchInlineListForKeyword110 :: forall. (Vector Char -> (Packed PList72 [(Packed Inline130 [])]) -> Bool) -searchInlineListForKeyword110 keyword424 inline_list425 = - case inline_list425 of - Nil73 -> - False - Cons74 inline426::(Packed Inline130 []) rst427::(Packed PList72 [(Packed Inline130 [])]) -> - ||((isKeywordPresentInline112 [] keyword424 inline426), (searchInlineListForKeyword110 [] keyword424 rst427)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -searchBlockListForKeyword111 :: forall. (Vector Char -> (Packed PList72 [(Packed Block131 [])]) -> Bool) -searchBlockListForKeyword111 keyword428 block_list429 = - case block_list429 of - Nil73 -> - False - Cons74 block430::(Packed Block131 []) rst431::(Packed PList72 [(Packed Block131 [])]) -> - ||((isKeywordPresentInBlock113 [] keyword428 block430), (searchBlockListForKeyword111 [] keyword428 rst431)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -isKeywordPresentInline112 :: forall. (Vector Char -> (Packed Inline130 []) -> Bool) -isKeywordPresentInline112 keyword432 inline433 = - case inline433 of - Str156 text434::Vector Char -> - (compareWord118 [] keyword432 text434) - Emph157 list_inline435::(Packed PList72 [(Packed Inline130 [])]) -> - (searchInlineListForKeyword110 [] keyword432 list_inline435) - Space158 -> - False - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -isKeywordPresentInBlock113 :: forall. (Vector Char -> (Packed Block131 []) -> Bool) -isKeywordPresentInBlock113 keyword436 contentBlock437 = - case contentBlock437 of - Plain154 list_inline438::(Packed PList72 [(Packed Inline130 [])]) -> - (searchInlineListForKeyword110 [] keyword436 list_inline438) - Null155 -> - False - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -insertTagList114 :: forall. (Vector Char -> (Packed PList72 [Vector Char]) -> (Packed PList72 [Vector Char])) -insertTagList114 keyword439 taglist440 = - case taglist440 of - Nil73 -> - (Cons74 (Vector Char) keyword439 (Nil73 (Vector Char))) - Cons74 word441::Vector Char rst442::(Packed PList72 [Vector Char]) -> - (insertTagList114 [] keyword439 rst442) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -deleteTagList115 :: forall. (Vector Char -> (Packed PList72 [Vector Char]) -> (Packed PList72 [Vector Char])) -deleteTagList115 keyword443 taglist444 = - case taglist444 of - Nil73 -> - (Nil73 (Vector Char)) - Cons74 word445::Vector Char rst446::(Packed PList72 [Vector Char]) -> - if (compareWord118 [] keyword443 word445) - then (deleteTagList115 [] keyword443 rst446) - else (Cons74 (Vector Char) word445 (deleteTagList115 [] keyword443 rst446)) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -searchTagList116 :: forall. (Vector Char -> (Packed PList72 [Vector Char]) -> Bool) -searchTagList116 keyword447 taglist448 = - case taglist448 of - Nil73 -> - False - Cons74 word449::Vector Char rst450::(Packed PList72 [Vector Char]) -> - ||((compareWord118 [] keyword447 word449), (searchTagList116 [] keyword447 rst450)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -cmp117 :: forall. (Int -> Int -> Vector Char -> Vector Char -> Bool) -cmp117 start451 end452 word1453 word2454 = - if start451 < end452 - then let a455 :: Char = (nth5 [Char] word1453 start451) in - let b456 :: Char = (nth5 [Char] word2454 start451) in - let eq457 :: Bool = if *==*(a455, b456) - then True - else False in - let recurse458 :: Bool = (cmp117 [] start451 + 1 end452 word1453 word2454) in - &&(eq457, recurse458) - else True - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -compareWord118 :: forall. (Vector Char -> Vector Char -> Bool) -compareWord118 word1459 word2460 = - let len1461 :: Int = (length3 [Char] word1459) in - let len2462 :: Int = (length3 [Char] word2460) in - let compare_len463 :: Bool = if len1461 == len2462 - then True - else False in - if compare_len463 - then (cmp117 [] 0 len1461 word1459 word2460) - else False - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -checkBlogID119 :: forall. ((Packed BlogId133 []) -> Int -> Bool) -checkBlogID119 id464 val465 = - case id464 of - ID152 x466::Int -> - if x466 == val465 - then True - else False - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkListFiles120 :: forall. (Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Int -> (Packed PList72 [Vector Char])) -mkListFiles120 f1467 f2468 f3469 f4470 f5471 f6472 f7473 f8474 f9475 f10476 len477 = - if len477 < 0 - then (Nil73 (Vector Char)) - else let f478 :: Vector Char = (getFile121 [] f1467 f2468 f3469 f4470 f5471 f6472 f7473 f8474 f9475 f10476 len477) in - let rst479 :: (Packed PList72 [Vector Char]) = (mkListFiles120 [] f1467 f2468 f3469 f4470 f5471 f6472 f7473 f8474 f9475 f10476 len477 - 1) in - (Cons74 (Vector Char) f478 rst479) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -getFile121 :: forall. (Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Vector Char -> Int -> Vector Char) -getFile121 f1480 f2481 f3482 f4483 f5484 f6485 f7486 f8487 f9488 f10489 select490 = - if select490 == 0 - then f1480 - else if select490 == 1 - then f2481 - else if select490 == 2 - then f3482 - else if select490 == 3 - then f4483 - else if select490 == 4 - then f5484 - else if select490 == 5 - then f6485 - else if select490 == 6 - then f7486 - else if select490 == 7 - then f8487 - else if select490 == 8 - then f9488 - else f10489 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkBlogTags122 :: forall. ((Packed PList72 [Vector Char]) -> (Packed BlogTags137 [])) -mkBlogTags122 taglist491 = - (TagList148 () taglist491) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkBlogContent123 :: forall. ((Packed Block131 []) -> (Packed BlogContent136 [])) -mkBlogContent123 block492 = - (Content149 () block492) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkBlogDate124 :: forall. (Vector Char -> (Packed BlogDate135 [])) -mkBlogDate124 text493 = - (Date150 () text493) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkBlogAuthor125 :: forall. (Vector Char -> (Packed BlogAuthor134 [])) -mkBlogAuthor125 text494 = - (Author151 () text494) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkBlogID126 :: forall. (Int -> (Packed BlogId133 [])) -mkBlogID126 val495 = - (ID152 () val495) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkBlogHeader127 :: forall. (Vector Char -> (Packed BlogHeader132 [])) -mkBlogHeader127 text496 = - (Header153 () text496) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -getRandomString128 :: forall. (Int -> Vector Char) -getRandomString128 length497 = - (generate2 [Char] length497 (fn:mkChar129 [])) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -mkChar129 :: forall. (Int -> Char) -mkChar129 val498 = - (getChar77 [] rand() mod 26) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -is_empty_plist59 :: forall b:a500. ((Packed PList72 [b:a500]) -> Bool) -is_empty_plist59 ls499 = - case ls499 of - Nil73 -> - True - Cons74 wildcard_1501::b:a500 wildcard_2502::(Packed PList72 [b:a500]) -> - False - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -zip_plist60 :: forall b:a505 b:b506. ((Packed PList72 [b:a505]) -> (Packed PList72 [b:b506]) -> (Packed PList72 [(b:a505,b:b506)])) -zip_plist60 as503 bs504 = - case as503 of - Nil73 -> - (Nil73 ((b:a505,b:b506))) - Cons74 z507::b:a505 zs508::(Packed PList72 [b:a505]) -> - case bs504 of - Nil73 -> - (Nil73 ((b:a505,b:b506))) - Cons74 y509::b:b506 ys510::(Packed PList72 [b:b506]) -> - (Cons74 ((b:a505,b:b506)) (z507, y509) (zip_plist60 [b:a505,b:b506] zs508 ys510)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -splitAt_plist61 :: forall b:a513. (Int -> (Packed PList72 [b:a513]) -> ((Packed PList72 [b:a513]),(Packed PList72 [b:a513]))) -splitAt_plist61 n511 a512 = - if n511 == 0 - then ((Nil73 (b:a513)), a512) - else case a512 of - Nil73 -> - ((Nil73 (b:a513)), (Nil73 (b:a513))) - Cons74 x514::b:a513 xs515::(Packed PList72 [b:a513]) -> - let tup63516 :: ((Packed PList72 [b:a513]),(Packed PList72 [b:a513])) = (splitAt_plist61 [b:a513] n511 - 1 xs515) in - let c517 :: (Packed PList72 [b:a513]) = (#0 tup63516) in - let d518 :: (Packed PList72 [b:a513]) = (#1 tup63516) in - ((Cons74 (b:a513) x514 c517), d518) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -map_plist62 :: forall b:a521 b:b522. ((b:a521 -> b:b522) -> (Packed PList72 [b:a521]) -> (Packed PList72 [b:b522])) -map_plist62 f519 ls520 = - case ls520 of - Nil73 -> - (Nil73 (b:b522)) - Cons74 x523::b:a521 xs524::(Packed PList72 [b:a521]) -> - (Cons74 (b:b522) (f519 [] x523) (map_plist62 [b:a521,b:b522] (fn:f519 []) xs524)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -reverse_plist63 :: forall b:a527. ((Packed PList72 [b:a527]) -> (Packed PList72 [b:a527]) -> (Packed PList72 [b:a527])) -reverse_plist63 xs525 acc526 = - case xs525 of - Nil73 -> - acc526 - Cons74 z528::b:a527 zs529::(Packed PList72 [b:a527]) -> - (reverse_plist63 [b:a527] zs529 (Cons74 (b:a527) z528 acc526)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -drop_plist64 :: forall b:a532. (Int -> (Packed PList72 [b:a532]) -> (Packed PList72 [b:a532])) -drop_plist64 num530 list531 = - case list531 of - Nil73 -> - (Nil73 (b:a532)) - Cons74 x533::b:a532 rst534::(Packed PList72 [b:a532]) -> - if <=(num530, 0) - then (Cons74 (b:a532) x533 rst534) - else (drop_plist64 [b:a532] num530 - 1 rst534) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -take_plist65 :: forall b:a537. (Int -> (Packed PList72 [b:a537]) -> (Packed PList72 [b:a537])) -take_plist65 n535 a536 = - if n535 == 0 - then (Nil73 (b:a537)) - else case a536 of - Nil73 -> - (Nil73 (b:a537)) - Cons74 z538::b:a537 zs539::(Packed PList72 [b:a537]) -> - (Cons74 (b:a537) z538 (take_plist65 [b:a537] n535 - 1 zs539)) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -filter_plist66 :: forall b:a542. ((b:a542 -> Bool) -> (Packed PList72 [b:a542]) -> (Packed PList72 [b:a542])) -filter_plist66 f540 a541 = - case a541 of - Nil73 -> - (Nil73 (b:a542)) - Cons74 z543::b:a542 zs544::(Packed PList72 [b:a542]) -> - if (f540 [] z543) - then (Cons74 (b:a542) z543 (filter_plist66 [b:a542] (fn:f540 []) zs544)) - else (filter_plist66 [b:a542] (fn:f540 []) zs544) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -length_plist67 :: forall b:a546. ((Packed PList72 [b:a546]) -> Int) -length_plist67 a545 = - case a545 of - Nil73 -> - 0 - Cons74 x547::b:a546 xs548::(Packed PList72 [b:a546]) -> - 1 + (length_plist67 [b:a546] xs548) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -nth_plist68 :: forall b:a553. ((Packed PList72 [b:a553]) -> b:a553 -> Int -> Int -> b:a553) -nth_plist68 list549 def550 index551 start552 = - case list549 of - Nil73 -> - def550 - Cons74 x554::b:a553 rst555::(Packed PList72 [b:a553]) -> - if index551 == start552 - then x554 - else (nth_plist68 [b:a553] rst555 def550 index551 start552 + 1) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -elem_plist69 :: forall b:a559. ((b:a559 -> b:a559 -> Int) -> b:a559 -> (Packed PList72 [b:a559]) -> Bool) -elem_plist69 cmp556 a557 list558 = - case list558 of - Nil73 -> - False - Cons74 x560::b:a559 rst561::(Packed PList72 [b:a559]) -> - if (cmp556 [] x560 a557) == 0 - then True - else (elem_plist69 [b:a559] (fn:cmp556 []) a557 rst561) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -tail_plist70 :: forall b:a563. ((Packed PList72 [b:a563]) -> (Packed PList72 [b:a563])) -tail_plist70 ls562 = - case ls562 of - Cons74 wildcard_10564::b:a563 xs565::(Packed PList72 [b:a563]) -> - xs565 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -head_plist71 :: forall b:a567. ((Packed PList72 [b:a567]) -> b:a567) -head_plist71 ls566 = - case ls566 of - Cons74 x568::b:a567 wildcard_6569::(Packed PList72 [b:a567]) -> - x568 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -maxInt49 :: forall. (Int -> Int -> Int) -maxInt49 a570 b571 = - if a570 > b571 - then a570 - else b571 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -print_space50 :: forall. (() -> ()) -print_space50 wildcard_20572 = - printsym(" ") - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -print_newline51 :: forall. (() -> ()) -print_newline51 wildcard_18573 = - printsym(" -") - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -print_check52 :: forall. (Bool -> ()) -print_check52 b574 = - if b574 - then let wildcard_14575 :: () = printsym("OK -") in - () - else let wildcard_16576 :: () = printsym("Err -") in - () - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -compare_int53 :: forall. (Int -> Int -> Int) -compare_int53 r1577 r2578 = - if r1577 < r2578 - then 0 - 1 - else if r1577 > r2578 - then 1 - else 0 - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -compare_float54 :: forall. (Float -> Float -> Int) -compare_float54 r1579 r2580 = - if .<.(r1579, r2580) - then 0 - 1 - else if .>.(r1579, r2580) - then 1 - else 0 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -float_abs55 :: forall. (Float -> Float) -float_abs55 f581 = - if .<.(f581, 0.0) - then .*.(f581, .-.(0.0, 1.0)) - else f581 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -minFloat56 :: forall. (Float -> Float -> Float) -minFloat56 a582 b583 = - if .<.(a582, b583) - then a582 - else b583 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -maxFloat57 :: forall. (Float -> Float -> Float) -maxFloat57 a584 b585 = - if .>.(a584, b585) - then a584 - else b585 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -minInt58 :: forall. (Int -> Int -> Int) -minInt58 a586 b587 = - if a586 < b587 - then a586 - else b587 - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -generate2 :: forall b:a590. (Int -> (Int -> b:a590) -> Vector b:a590) -generate2 n588 f589 = - let n_591 :: Int = (maxInt49 [] n588 0) in - let vec592 :: Vector b:a590 = (valloc :: [b:a590])(n_591) in - let vec1593 :: Vector b:a590 = (generate_loop32 [b:a590] vec592 0 n_591 (fn:f589 [])) in - vec1593 - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -length3 :: forall b:a595. (Vector b:a595 -> Int) -length3 vec594 = - vlength(vec594) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -select4 :: forall b:a599. (Vector b:a599 -> Vector b:a599 -> Int -> b:a599) -select4 v1596 v2597 i598 = - let len600 :: Int = vlength(v1596) in - if i598 < len600 - then vnth(v1596, i598) - else vnth(v2597, i598 - len600) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -nth5 :: forall b:a603. (Vector b:a603 -> Int -> b:a603) -nth5 vec601 i602 = - vnth(vec601, i602) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -singleton6 :: forall b:a605. (b:a605 -> Vector b:a605) -singleton6 x604 = - let vec606 :: Vector b:a605 = (valloc :: [b:a605])(1) in - let vec2607 :: Vector b:a605 = inplacevupdate(vec606, 0, x604) in - vec2607 - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -append7 :: forall b:a610. (Vector b:a610 -> Vector b:a610 -> Vector b:a610) -append7 v1608 v2609 = - (generate2 [b:a610] vlength(v1608) + vlength(v2609) (\(i611 :: Int) -> - (select4 [b:a610] v1608 v2609 i611))) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -head8 :: forall b:a613. (Vector b:a613 -> b:a613) -head8 vec612 = - (nth5 [b:a613] vec612 0) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printVec9 :: forall b:a616. ((b:a616 -> ()) -> Vector b:a616 -> ()) -printVec9 f614 vec615 = - let wildcard_178617 :: () = printsym("[") in - let wildcard_176618 :: () = (printVec_loop17 [b:a616] 0 vlength(vec615) vec615 (fn:f614 [])) in - let wildcard_173619 :: () = printsym("]") in - () - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -alloc10 :: forall b:a621. (Int -> Vector b:a621) -alloc10 vec620 = - (valloc :: [b:a621])(vec620) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -filter11 :: forall b:a624. ((b:a624 -> Bool) -> Vector b:a624 -> Vector b:a624) -filter11 f622 vec623 = - let idxs626 :: Vector Int = (generate2 [Int] vlength(vec623) (\(i625 :: Int) -> - if (f622 [] (nth5 [b:a624] vec623 i625)) - then i625 - else 0 - 1)) in - let num_ones629 :: Int = (foldl26 [Int,Int] (\(acc628 :: Int, x627 :: Int) -> - if x627 == 0 - 1 - then acc628 - else acc628 + 1) 0 idxs626) in - let to630 :: Vector b:a624 = (valloc :: [b:a624])(num_ones629) in - let len_idxs631 :: Int = vlength(idxs626) in - (filter_loop12 [b:a624] idxs626 0 0 len_idxs631 vec623 to630) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -filter_loop12 :: forall b:a638. (Vector Int -> Int -> Int -> Int -> Vector b:a638 -> Vector b:a638 -> Vector b:a638) -filter_loop12 idxs632 write_at633 start634 end635 from636 to637 = - if start634 == end635 - then to637 - else let idx639 :: Int = (nth5 [Int] idxs632 start634) in - if idx639 == 0 - 1 - then (filter_loop12 [b:a638] idxs632 write_at633 start634 + 1 end635 from636 to637) - else let elt640 :: b:a638 = (nth5 [b:a638] from636 idx639) in - let to1641 :: Vector b:a638 = inplacevupdate(to637, write_at633, elt640) in - (filter_loop12 [b:a638] idxs632 write_at633 + 1 start634 + 1 end635 from636 to1641) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -lcons13 :: forall b:a644. (b:a644 -> Vector b:a644 -> Vector b:a644) -lcons13 x642 vec643 = - let y645 :: Vector b:a644 = vec643 in - (cons14 [b:a644] x642 y645) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -cons14 :: forall b:a648. (b:a648 -> Vector b:a648 -> Vector b:a648) -cons14 x646 vec647 = - let len649 :: Int = vlength(vec647) in - let vec2650 :: Vector b:a648 = (valloc :: [b:a648])(len649 + 1) in - let vec3652 :: Vector b:a648 = (generate_loop32 [b:a648] vec2650 1 len649 + 1 (\(i651 :: Int) -> - (nth5 [b:a648] vec647 i651 - 1))) in - let vec4653 :: Vector b:a648 = inplacevupdate(vec3652, 0, x646) in - vec4653 - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -lsnoc15 :: forall b:a656. (Vector b:a656 -> b:a656 -> Vector b:a656) -lsnoc15 vec654 x655 = - let y657 :: Vector b:a656 = vec654 in - (snoc16 [b:a656] y657 x655) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -snoc16 :: forall b:a660. (Vector b:a660 -> b:a660 -> Vector b:a660) -snoc16 vec658 x659 = - let len661 :: Int = vlength(vec658) in - let vec2662 :: Vector b:a660 = (valloc :: [b:a660])(len661 + 1) in - let vec3664 :: Vector b:a660 = (generate_loop32 [b:a660] vec2662 0 len661 (\(i663 :: Int) -> - (nth5 [b:a660] vec658 i663))) in - let vec4665 :: Vector b:a660 = inplacevupdate(vec3664, len661, x659) in - vec4665 - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -printVec_loop17 :: forall b:a670. (Int -> Int -> Vector b:a670 -> (b:a670 -> ()) -> ()) -printVec_loop17 idx666 end667 vec668 f669 = - if idx666 == end667 - then () - else let wildcard_187671 :: () = (f669 [] vnth(vec668, idx666)) in - let wildcard_184672 :: () = printsym(",") in - (printVec_loop17 [b:a670] idx666 + 1 end667 vec668 (fn:f669 [])) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -lifoldl18 :: forall b:a676 b:b677. ((b:b677 -> Int -> b:a676 -> b:b677) -> b:b677 -> Vector b:a676 -> b:b677) -lifoldl18 f673 acc674 vec675 = - let x678 :: Vector b:a676 = vec675 in - (ifoldl20 [b:a676,b:b677] (fn:f673 []) acc674 x678) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -ifoldl_loop19 :: forall b:a684 b:b685. (Int -> Int -> (b:b685 -> Int -> b:a684 -> b:b685) -> b:b685 -> Vector b:a684 -> b:b685) -ifoldl_loop19 idx679 end680 f681 acc682 vec683 = - if idx679 == end680 - then acc682 - else let acc1686 :: b:b685 = (f681 [] acc682 idx679 vnth(vec683, idx679)) in - (ifoldl_loop19 [b:a684,b:b685] idx679 + 1 end680 (fn:f681 []) acc1686 vec683) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -ifoldl20 :: forall b:a690 b:b691. ((b:b691 -> Int -> b:a690 -> b:b691) -> b:b691 -> Vector b:a690 -> b:b691) -ifoldl20 f687 acc688 vec689 = - (ifoldl_loop19 [b:a690,b:b691] 0 vlength(vec689) (fn:f687 []) acc688 vec689) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -lscanl21 :: forall b:a695 b:b696. ((b:b696 -> b:a695 -> b:b696) -> b:b696 -> Vector b:a695 -> Vector b:b696) -lscanl21 f692 acc693 vec694 = - let x697 :: Vector b:a695 = vec694 in - (scanl23 [b:a695,b:b696] (fn:f692 []) acc693 x697) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -scanl_loop22 :: forall b:a704 b:b705. (Int -> Int -> (b:b705 -> b:a704 -> b:b705) -> b:b705 -> Vector b:a704 -> Vector b:b705 -> Vector b:b705) -scanl_loop22 idx698 end699 f700 acc701 vec702 result703 = - if idx698 == end699 - then result703 - else let acc1706 :: b:b705 = (f700 [] acc701 vnth(vec702, idx698)) in - let result_707 :: Vector b:b705 = inplacevupdate(result703, idx698, acc1706) in - (scanl_loop22 [b:a704,b:b705] idx698 + 1 end699 (fn:f700 []) acc1706 vec702 result_707) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -scanl23 :: forall b:a711 b:b712. ((b:b712 -> b:a711 -> b:b712) -> b:b712 -> Vector b:a711 -> Vector b:b712) -scanl23 f708 acc709 vec710 = - let len713 :: Int = vlength(vec710) in - let result714 :: Vector b:b712 = (valloc :: [b:b712])(len713) in - (scanl_loop22 [b:a711,b:b712] 0 len713 (fn:f708 []) acc709 vec710 result714) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -lfoldl24 :: forall b:a718 b:b719. ((b:b719 -> b:a718 -> b:b719) -> b:b719 -> Vector b:a718 -> b:b719) -lfoldl24 f715 acc716 vec717 = - let x720 :: Vector b:a718 = vec717 in - (foldl26 [b:a718,b:b719] (fn:f715 []) acc716 x720) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -foldl_loop25 :: forall b:a726 b:b727. (Int -> Int -> (b:b727 -> b:a726 -> b:b727) -> b:b727 -> Vector b:a726 -> b:b727) -foldl_loop25 idx721 end722 f723 acc724 vec725 = - if idx721 == end722 - then acc724 - else let acc1728 :: b:b727 = (f723 [] acc724 vnth(vec725, idx721)) in - (foldl_loop25 [b:a726,b:b727] idx721 + 1 end722 (fn:f723 []) acc1728 vec725) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -foldl26 :: forall b:a732 b:b733. ((b:b733 -> b:a732 -> b:b733) -> b:b733 -> Vector b:a732 -> b:b733) -foldl26 f729 acc730 vec731 = - (foldl_loop25 [b:a732,b:b733] 0 vlength(vec731) (fn:f729 []) acc730 vec731) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -update27 :: forall b:a737. (Vector b:a737 -> Int -> b:a737 -> Vector b:a737) -update27 vec734 i735 x736 = - (generate2 [b:a737] (length3 [b:a737] vec734) (\(j738 :: Int) -> - if i735 == j738 - then x736 - else vnth(vec734, j738))) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -lmap28 :: forall b:a741 b:b742. ((b:a741 -> b:b742) -> Vector b:a741 -> Vector b:b742) -lmap28 f739 vec740 = - let x743 :: Vector b:a741 = vec740 in - (map29 [b:a741,b:b742] (fn:f739 []) x743) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -map29 :: forall b:a746 b:b747. ((b:a746 -> b:b747) -> Vector b:a746 -> Vector b:b747) -map29 f744 vec745 = - (generate2 [b:b747] vlength(vec745) (\(i748 :: Int) -> - (f744 [] vnth(vec745, i748)))) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -lcopy30 :: forall b:a750. (Vector b:a750 -> Vector b:a750) -lcopy30 vec749 = - (copy31 [b:a750] vec749) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -copy31 :: forall b:a752. (Vector b:a752 -> Vector b:a752) -copy31 vec751 = - (generate2 [b:a752] vlength(vec751) (\(i753 :: Int) -> - (nth5 [b:a752] vec751 i753))) - -{meta: FunMeta {funRec = NotRec, funInline = NoInline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -generate_loop32 :: forall b:a758. (Vector b:a758 -> Int -> Int -> (Int -> b:a758) -> Vector b:a758) -generate_loop32 vec754 idx755 end756 f757 = - if idx755 == end756 - then vec754 - else let vec1759 :: Vector b:a758 = inplacevupdate(vec754, idx755, (f757 [] idx755)) in - (generate_loop32 [b:a758] vec1759 idx755 + 1 end756 (fn:f757 [])) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -tail33 :: forall b:a761. (Vector b:a761 -> Vector b:a761) -tail33 vec760 = - (slice44 [b:a761] 1 vlength(vec760) - 1 vec760) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -lsplitAt_34 :: forall b:a764. (Int -> Vector b:a764 -> (Int,Vector b:a764,Int,Vector b:a764)) -lsplitAt_34 n762 vec763 = - let tup74765 :: (Vector b:a764,Vector b:a764) = (splitAt36 [b:a764] n762 vec763) in - let x766 :: Vector b:a764 = (#0 tup74765) in - let y767 :: Vector b:a764 = (#1 tup74765) in - (vlength(x766), x766, vlength(y767), y767) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -lsplitAt35 :: forall b:a770. (Int -> Vector b:a770 -> (Int,Vector b:a770,Int,Vector b:a770)) -lsplitAt35 n768 vec769 = - let x771 :: Vector b:a770 = vec769 in - (lsplitAt_34 [b:a770] n768 x771) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -splitAt36 :: forall b:a774. (Int -> Vector b:a774 -> (Vector b:a774,Vector b:a774)) -splitAt36 n772 vec773 = - let len775 :: Int = vlength(vec773) in - let n_776 :: Int = (maxInt49 [] n772 0) in - let m777 :: Int = (minInt58 [] n_776 len775) in - let m_778 :: Int = (maxInt49 [] 0 len775 - n_776) in - (vslice(0, m777, vec773), vslice(m777, m_778, vec773)) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -isEmpty37 :: forall b:a780. (Vector b:a780 -> Bool) -isEmpty37 vec779 = - vlength(vec779) == 0 - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -inplaceUpdate38 :: forall b:a784. (Int -> b:a784 -> Vector b:a784 -> Vector b:a784) -inplaceUpdate38 i781 val782 vec783 = - inplacevupdate(vec783, i781, val782) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -inplaceSort39 :: forall b:a787. ((b:a787 -> b:a787 -> Int) -> Vector b:a787 -> Vector b:a787) -inplaceSort39 cmp785 vec786 = - inplacevsort(vec786, (fn:cmp785 [])) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -flatten40 :: forall b:a789. (Vector Vector b:a789 -> Vector b:a789) -flatten40 ls788 = - vconcat(ls788) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -sort41 :: forall b:a792. ((b:a792 -> b:a792 -> Int) -> Vector b:a792 -> Vector b:a792) -sort41 cmp790 vec791 = - vsort(vec791, (fn:cmp790 [])) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -merge42 :: forall b:a795. (Vector b:a795 -> Vector b:a795 -> Vector b:a795) -merge42 vec1793 vec2794 = - vmerge(vec1793, vec2794) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -unsafeSlice43 :: forall b:a799. (Int -> Int -> Vector b:a799 -> Vector b:a799) -unsafeSlice43 i796 n797 vec798 = - vslice(i796, n797, vec798) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -slice44 :: forall b:a803. (Int -> Int -> Vector b:a803 -> Vector b:a803) -slice44 i800 n801 vec802 = - vslice(i800, n801, vec802) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -nth245 :: forall b:a806. (Vector b:a806 -> Int -> (b:a806,Vector b:a806)) -nth245 vec804 i805 = - let tup26807 :: Vector b:a806 = vec804 in - let vec1808 :: Vector b:a806 = tup26807 in - let vec2809 :: Vector b:a806 = tup26807 in - (vnth(vec1808, i805), vec2809) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -nth146 :: forall b:a812. (Vector b:a812 -> Int -> b:a812) -nth146 vec810 i811 = - vnth(vec810, i811) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -length247 :: forall b:a814. (Vector b:a814 -> (Int,Vector b:a814)) -length247 vec813 = - let tup12815 :: Vector b:a814 = vec813 in - let vec1816 :: Vector b:a814 = tup12815 in - let vec2817 :: Vector b:a814 = tup12815 in - (vlength(vec1816), vec2817) - -{meta: FunMeta {funRec = NotRec, funInline = Inline, funCanTriggerGC = False, funOptLayout = NoLayoutOpt, userConstraintsDataCon = Nothing}} -length148 :: forall b:a819. (Vector b:a819 -> Int) -length148 vec818 = - vlength(vec818) - -gibbon_main :: () -gibbon_main = let blogs159 :: (Packed Blog138 []) = (mkBlogs_layout11 [] 2) in - let keyword162 :: Vector Char = let vec16160 :: Vector Char = (valloc :: [Char])(1) in - let _161 :: Vector Char = inplacevupdate(vec16160, 0, 'a') in - vec16160 in - let newblgs163 :: (Packed Blog138 []) = (emphKeywordInContent0 [] keyword162 blogs159) in - (printBlog76 [] newblgs163) -Layout1 Header [,,,,,]ID Author [,,,,,]Date [,,,,,]Content Plain PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Emph PList ( Cons Str [,]Nil ) PList ( Cons Str [,]PList ( Cons Emph PList ( Cons Str [,]Nil ) Nil ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) TagList PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]Nil ) ) ) ) ) ) ) ) ) ) Layout1 Header [,,,,,]ID Author [,,,,,]Date [,,,,,]Content Plain PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]PList ( Cons Str [,]Nil ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) TagList PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]PList ( Cons [,]Nil ) ) ) ) ) ) ) ) ) ) gibbon: lookup3: key "End139" not found in list: - [("Layout1140",[(Var "header186",PackedTy "BlogHeader132" []),(Var "id187",PackedTy "BlogId133" []),(Var "author188",PackedTy "BlogAuthor134" []),(Var "date189",PackedTy "BlogDate135" []),(Var "content190",PackedTy "BlogContent136" []),(Var "tags191",PackedTy "BlogTags137" []),(Var "rst192",PackedTy "Blog138" [])],LetE (Var "wildcard_344193",[],ProdTy [],PrimAppE PrintSym [LitSymE (Var "Layout1 ")]) (LetE (Var "wildcard_342194",[],ProdTy [],AppE (Var "printHeader83") [] [VarE (Var "header186")]) (LetE (Var "wildcard_340195",[],ProdTy [],AppE (Var "printID82") [] [VarE (Var "id187")]) (LetE (Var "wildcard_338196",[],ProdTy [],AppE (Var "printAuthor84") [] [VarE (Var "author188")]) (LetE (Var "wildcard_336197",[],ProdTy [],AppE (Var "printDate85") [] [VarE (Var "date189")]) (LetE (Var "wildcard_334198",[],ProdTy [],AppE (Var "printContent87") [] [VarE (Var "content190")]) (LetE (Var "wildcard_332199",[],ProdTy [],AppE (Var "printTagList86") [] [VarE (Var "tags191")]) (LetE (Var "wildcard_330200",[],ProdTy [],AppE (Var "printBlog76") [] [VarE (Var "rst192")]) (MkProdE [])))))))))] +gibbon: haskell-src-exts failed: Parse error: ;, at .hs:593:21 CallStack (from HasCallStack): - error, called at src/Gibbon/Common.hs:363:12 in gibbon-0.3-inplace:Gibbon.Common - lookup3, called at src/Gibbon/L1/Interp.hs:124:42 in gibbon-0.3-inplace:Gibbon.L1.Interp + error, called at src/Gibbon/HaskellFrontend.hs:115:7 in gibbon-0.3-inplace:Gibbon.HaskellFrontend diff --git a/gibbon-compiler/src/Gibbon/L1/Interp.hs b/gibbon-compiler/src/Gibbon/L1/Interp.hs index b9d45b8ec..f414b7e9e 100644 --- a/gibbon-compiler/src/Gibbon/L1/Interp.hs +++ b/gibbon-compiler/src/Gibbon/L1/Interp.hs @@ -120,8 +120,16 @@ interp rc valenv ddefs fenv = go valenv v <- go env x1 case v of VPacked k ls2 -> do + let lookup3' :: (Eq k, Show k, Show a, Show b) => k -> [(k,a,b)] -> (k,a,b) + lookup3' k ls = go ls + where + --go [] = error$ "lookup3: key "++show k++" not found in list:\n "++L.take 80 (show ls) + go [] = error$ "lookup3: key "++show k++" not found in list:\n "++ (show alts) + go ((k1,a1,b1):r) + | k1 == k = (k1,a1,b1) + | otherwise = go r let vs = L.map fst prs - (_,prs,rhs) = lookup3 k alts + (_,prs,rhs) = lookup3' k alts env' = M.union (M.fromList (zip vs ls2)) env go env' rhs _ -> error$ "L1.Interp: type error, expected data constructor, got: "++ndoc v++