|
| 1 | +concrete DocumentationUkr of Documentation = CatUkr ** open |
| 2 | + ResUkr, Prelude, HTML in { |
| 3 | + |
| 4 | +lincat |
| 5 | + Inflection = {t : Str; s1,s2,s3 : Str} ; |
| 6 | + Definition = {s : Str} ; |
| 7 | + Document = {s : Str} ; |
| 8 | + Tag = {s : Str} ; |
| 9 | + |
| 10 | +lin |
| 11 | + InflectionN,InflectionN2,InflectionN3 = \x -> { |
| 12 | + t="n" ; |
| 13 | + s1="" ; |
| 14 | + s2=frameTable ( |
| 15 | + tr (intagAttr "th" "rowspan=\"2\"" "Nom" ++ th "Sg" ++ td (x.s ! Nom ! Sg)) ++ |
| 16 | + tr (th "Pl" ++ td (x.s ! Nom ! Pl)) ++ |
| 17 | + tr (intagAttr "th" "rowspan=\"2\"" "Acc" ++ th "Sg" ++ td (x.s ! Acc ! Sg)) ++ |
| 18 | + tr (th "Pl" ++ td (x.s ! Acc ! Pl)) ++ |
| 19 | + tr (intagAttr "th" "rowspan=\"2\"" "Dat" ++ th "Sg" ++ td (x.s ! Dat ! Sg)) ++ |
| 20 | + tr (th "Pl" ++ td (x.s ! Dat ! Pl)) ++ |
| 21 | + tr (intagAttr "th" "rowspan=\"2\"" "Gen" ++ th "Sg" ++ td (x.s ! Gen ! Sg)) ++ |
| 22 | + tr (th "Pl" ++ td (x.s ! Gen ! Pl)) ++ |
| 23 | + tr (intagAttr "th" "rowspan=\"2\"" "Loc" ++ th "Sg" ++ td (x.s ! Loc ! Sg)) ++ |
| 24 | + tr (th "Pl" ++ td (x.s ! Loc ! Pl)) ++ |
| 25 | + tr (intagAttr "th" "rowspan=\"2\"" "Instr" ++ th "Sg" ++ td (x.s ! Instr ! Sg)) ++ |
| 26 | + tr (th "Pl" ++ td (x.s ! Instr ! Pl)) ++ |
| 27 | + tr (intagAttr "th" "rowspan=\"2\"" "Voc" ++ th "Sg" ++ td (x.Voc ! Sg)) ++ |
| 28 | + tr (th "Pl" ++ td (x.Voc ! Pl))) ; |
| 29 | + s3=[] |
| 30 | + } ; |
| 31 | +lin |
| 32 | + InflectionV,InflectionV2,InflectionV2A,InflectionV2Q,InflectionV2S,InflectionV2V,InflectionV3,InflectionVA,InflectionVQ,InflectionVS,InflectionVV = \x -> { |
| 33 | + t="v" ; |
| 34 | + s1="" ; |
| 35 | + s2=heading1 "Infinitive" ++ |
| 36 | + paragraph (x.infinitive) ++ |
| 37 | + heading1 "Present" ++ |
| 38 | + frameTable ( |
| 39 | + tr (intagAttr "th" "rowspan=\"6\"" "Pres" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td ((x.active ! Imperf).Pres ! P1 ! Sg)) ++ |
| 40 | + tr (th "Pl" ++ td ((x.active ! Imperf).Pres ! P1 ! Pl)) ++ |
| 41 | + tr (intagAttr "th" "rowspan=\"2\"" "P2" ++ th "Sg" ++ td ((x.active ! Imperf).Pres ! P2 ! Sg)) ++ |
| 42 | + tr (th "Pl" ++ td ((x.active ! Imperf).Pres ! P2 ! Pl)) ++ |
| 43 | + tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td ((x.active ! Imperf).Pres ! P3 ! Sg)) ++ |
| 44 | + tr (th "Pl" ++ td ((x.active ! Imperf).Pres ! P3 ! Pl))) ++ |
| 45 | + heading1 "Imperative" ++ |
| 46 | + paragraph (x.imperative1) ++ |
| 47 | + frameTable ( |
| 48 | + tr (th "Sg" ++ td (x.imperative2 ! Sg)) ++ |
| 49 | + tr (th "Pl" ++ td (x.imperative2 ! Pl))) ++ |
| 50 | + heading1 "participle" ++ |
| 51 | + frameTable ( |
| 52 | + tr (th "" ++ th "Sg" ++ th "Pl") ++ |
| 53 | + tr (th "Masc" ++ td (x.participle ! Masc ! Sg) ++ td (x.participle ! Masc ! Pl)) ++ |
| 54 | + tr (th "Fem" ++ td (x.participle ! Fem ! Sg) ++ td (x.participle ! Fem ! Pl)) ++ |
| 55 | + tr (th "Neuter" ++ td (x.participle ! Neuter ! Sg) ++ td (x.participle ! Neuter ! Pl))) ; |
| 56 | + s3=[] |
| 57 | + } ; |
| 58 | +lin |
| 59 | + InflectionA,InflectionA2 = \x -> { |
| 60 | + t="a" ; |
| 61 | + s1="" ; |
| 62 | + s2=frameTable ( |
| 63 | + tr (th "" ++ th "Masc" ++ th "Fem" ++ th "Neuter" ++ th "Pl") ++ |
| 64 | + tr (th "Nom" ++ td (x.s ! Nom ! GSg Masc) ++ td (x.s ! Nom ! GSg Fem) ++ td (x.s ! Nom ! GSg Neuter) ++ td (x.s ! Nom ! GPl)) ++ |
| 65 | + tr (th "Acc" ++ td (x.s ! Acc ! GSg Masc) ++ td (x.s ! Acc ! GSg Fem) ++ td (x.s ! Acc ! GSg Neuter) ++ td (x.s ! Acc ! GPl)) ++ |
| 66 | + tr (th "Dat" ++ td (x.s ! Dat ! GSg Masc) ++ td (x.s ! Dat ! GSg Fem) ++ td (x.s ! Dat ! GSg Neuter) ++ td (x.s ! Dat ! GPl)) ++ |
| 67 | + tr (th "Gen" ++ td (x.s ! Gen ! GSg Masc) ++ td (x.s ! Gen ! GSg Fem) ++ td (x.s ! Gen ! GSg Neuter) ++ td (x.s ! Gen ! GPl)) ++ |
| 68 | + tr (th "Loc" ++ td (x.s ! Loc ! GSg Masc) ++ td (x.s ! Loc ! GSg Fem) ++ td (x.s ! Loc ! GSg Neuter) ++ td (x.s ! Loc ! GPl)) ++ |
| 69 | + tr (th "Instr"++td (x.s ! Instr ! GSg Masc)++td (x.s ! Instr ! GSg Fem)++td (x.s ! Instr ! GSg Neuter)++td (x.s ! Instr ! GPl))) ; |
| 70 | + s3=[] |
| 71 | + } ; |
| 72 | +lin |
| 73 | + InflectionAdA,InflectionAdN,InflectionAdV,InflectionAdv = \x -> {t="adv"; s1=""; s2=x.s; s3=""} ; |
| 74 | + |
| 75 | + InflectionPrep = \x -> {t="prep"; s1=""; s2=x.s; s3=""} ; |
| 76 | + |
| 77 | +lin |
| 78 | + NoDefinition t = {s=t.s}; |
| 79 | + MkDefinition t d = {s="<p><b>Definition:</b>"++t.s++d.s++"</p>"}; |
| 80 | + MkDefinitionEx t d e = {s="<p><b>Definition:</b>"++t.s++d.s++"</p><p><b>Example:</b>"++e.s++"</p>"}; |
| 81 | + |
| 82 | +lin |
| 83 | + MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ i.s3 ++ e.s} ; |
| 84 | + MkTag i = {s = i.t} ; |
| 85 | +} |
0 commit comments