KNOWN BUGS:
--- [Weak] doesn't work, see comment in tools.ml, sometimes even segfaults
--- compiling [compiler.dul] takes too much memory and time
--- record pattern matching is only partially implemented
--- core.dul [t35] should be [`A] is [`a], because [map] guesses too weakly,
    similarly in [t36, t38], although [t37] is good

TO DO: (encrypted;)
1. example based on current compiler, example SubFFunct from Substitution by
   ind load AppFFunct with {}; ind load Substitution with SubFunct
17. prove smth. about rewriting, fixpoint is now a speed bottleneck
20. prove smth. about type reconstruction
42. @ operator from Charity
46. add tools for separate compilation, compiled code as psudo-module, 
    like Int, Word,..
84. add built in int, char, etc. _cleanly_
47. add coinciding algera/coalgera or Views using value t2ind : ...
58. complete t_map for case of F_COMP (F_ii . F_PR) --- no, this is
    only expressible when there are folds over inductive modules,
    but isssue warning when t_map gets trivial --- probably typing error
70. add folds for monstrous inductive types spawned by Ind, then shorten RDule,
    also express t_TF_coco as TF
63. what subset of RDule BDule generates
65. think about default variants, or exceptions, or coexponent and covariables
66. think about axioms, Ww (m, s), indexed categories
67. pattern-matching or at least _ for Char
68. think about functional or contextual completness
69. try again higher-order modules, specify exactly when not possible
78. how to order [let] to show which things are independent,
94. check what should be right-associative in parser
103. symbol table for Index --- is hash-consing too slow?
108. show how to obtain "theorems for free"
110. see how bug.ml is solved in Dule
114. consider beta-lifting and fun y -> y*x changed to (fun y x -> y*x) x
123. optimize memoization and hash-consing
124. eq_funct_inner wrong for ii.pr ii.pr2 or ii.tt ??? 
125. simplify eq_funct_inner and funct_hash
127. reconstruct file caches (the Dule "make")
132. check that all conditions in elabLDule are true in core_front
134. use ... as in PhD and list comprehensions as well as pattern matching
137. make F_wild, not only F_x, add wild flag to F_var
138. check what Marek says about modules being functors
139. %If it is possible, following should be mentioned in a document like
     %"requirement for a software to enter the archive" :
     % - use and provide ocamlfind and META
     % - can produce ocamldoc documentation 
140. Add universal type for sketching, prototyping
141. check that I do not use =, but eq
142. may occur happen in f buried in lf_stamp?
160. is occurs in modules possible --- depends on Ww inside get_elem?
144. (* this below doesn't work, because exp in map: 
     value v = ((map it -> map it) ~it:(map it -> map it)) ~it:{} *)
148. issue warnings when variables undecided after unify in core and modules
158. args to spec rec equal to stripped are wrongly accepted
161. treat Ww as COMP and so unify luni in core and modules --- this is hard
     because Ww is trimmed to fit arguments of Pp(s,...), and wouldn't fit s
162. how to merge locations? (l_start_1, l_end_2) --- do I need this?
163. fix (* needen't be small *) in both luni and gtuni
164. fix memory leaks caused by Caches
166. better error reporting: multiple locations, flags, 
     correct location in type-backtracking, etc., pp issues 
169. separate exceptions for Dule assert and fail
170. if map guesses more strongly is the derived typing the smallest,
     as the rule for basic modules(?) requires?
171. why [t43] triggers surprise in core_middle
173. in mod_back turn into internal those errors that are impossible w/o _._
174. [Sh_compchoose2] should fail? Similarly as weakly guessing [map]?
175, is [loccurs] good?
176. should [IList]'s [Elem] have eq? Then eqset recursive.
177. use asserts in tests (core, strange) to catch errors
179. perhaps recover the el_dule that checks s1=r2 in M_Comp etc.
181. add first class modules (load M) --- type-checking hard
182. repair s_CC in mod_front
183. internal error at error_reporting/mod_middle_1.dul
145. repair record patterns in ll_parser.ml
183. should sc_BB check fi types end in BB?

DONE:
21. i is sometimes wrongly bound in F_ii, fix make equal upto alpha
0. prettier modularization in current program
19. not a module in el_dule
2. guessing by cod
9. is this a CC
11. Comp with different cod, dom
7. sugar for T_ired (in ElabCDule)
10. finish type-checking (fold unfold)
22. finish Ww as needed
28. List' = copy List in library
26. Perhaps simplify SDule by identifying S : R with S = -> R
27. make sigs before -> in SDule.EE local to this EE, also snse
34. complete ee in dpaf
32. remove -> rem when possible, better change remove to rem in IList
31. add mutually recursive types by bounding self in ind or putting fb
38. add eta to eq_funct
4. rewriting
39. COMP (PAIR (ID BB), F_ii) good in Elab fails in Sim. 
41. make F_ii, case and fold use "up" to avoid alpha, etc.
35. check that sig in Ww not out of scope
45. remove up
23. ad let in prep
14. forbid gluing Pp in el_base or make this correct
15. recursive modules to allow irec c: list(c) or higher order mods or poly
18. look how sim_T_ee lu i u may be written as curry
44. change idenifiers in t_*f in ElabEDule
24. iflatten_assert in case in ElabEDule should be Error/OK not assert
37. remove some lg and other args in EDule but then unpp in DynECore
25. check unify on F_COMP and paf as a non-normal form in various places
54. add TE_map and CDule.map
52. add CutComp 
50. perhaps remove unPp and domain or else domain : dule -> SigEnv.par
59. EDule.Bb takes lists while Base takes single functs and trans
60. check unPp a propos prog27 in short.ml
55. look at modules: toolLDule.ml dynEDule.ml and above
13. check in ElabSDule in Ww,Mm and Pair, Inst, Link, Ind
80. move from a b c to c d e a b for categories
61. switch ElabCDule.el_typ to OkError
83. remove or repair local
88. should Join inherit domain? yes --- analogy to Pp
89. finish Comp_Pr, in fact a true signature-reconstruction is needed, no
90. perhaps make Comp left-associative then move Comp_Pr from prep to EM
85. finish automatic signatures
30. change ElabCDule.el_valu into OkError: speed + error messages + clear
95. optimize, e.g. mt_Base
98. repair *.dul examples when commented out
99. put into .dud text with unwinded loads and Ii, for soundness
101. use GDule to conserve memory
6. general recursion and contradiction with T_ss and other
8. is covariant arrow good
64. adjoints as giving rise to labeled product and exponent
107. remove first three clauses in t_comp
116. change Cut to Trim
113. move scripts into Makefile
118. parse fold f g as (fold f) g
120. remove li_label and change ilist to list in link
71. switch all signature names to be the same as module
62. position information
79. partial application in T_abs, after true type-reconstruction
128. Lo_progtest11149 bug in ElabBDule
131. hold off trans reductions until types infered?
133. "it" instead of "nut" after Arc
143. for composing with vars <> should be ID, etc.
130. check that lc and lt have never non-rigid stamps
126. move mentos outside
129. if t_TF was used in core_front we would have problem with ilist stamps
87. should Comp cut implicitly? Yes, Inst does, to cut cats from args. No.
149. perhaps make "." "|" simple and only "with" trimming
151. error: type libraries and specs on declaration rather than on use
147. make el_sp n correct by adding things to n in Pp, etc.
153. ensure that link T = T end is illegal --- this is topological sorting
152. is sig end forth-equal to {}? So is sig-checking sound? y, y --- approx.
146. in type part remove modules with empty list of cats 
     --- then type t = EqCat (* = <> *) stays illegal --- OK
121. assure even dead code is type-checked
112. rewrite OCaml borrowed code
77. mark which errors are impossible
82. a variant of BDule with unifying recursive signatures and type-inference
92. repair el_sp_types(S_Ww) by inspecting only sign args of m1
111. name args to fold, etc. g not f1 in code
75. in IList make inter, diff check eq
122. colon after comment, which relates to code below
168. currently unused specs are not fully type-checked
159. spec recs are computed again for each single spec
167. use assert and fail in lib.dul, etc.
143. add [if then else] and [rec] similar to [fold] --- OK and NO
183. do signatures translated form user language have always defined product?no
178. ensure test/errors/* report errors agreeing with their names
118. How isDU in singlePp copes with sig type t end -> sig value v : t end ?
97. pretty-p of FCore
105. a lemma that t_FT(f, t) rewrites just as t (T_map is not an obstacle)
165. is Pp lr always defined here? in mod_back and in M_Ind --- nm
184. with good map are those in m_Record in comiler.dul correct? yes

WILL NOT BE DONE:
3. APPL and simple F_ii f, but not so simple, because f has to be a -> a
   and after CURRY it's a -> EE(c, a), so fake EE in src is needed as in fold. 
29. dule instead of ident in library for _, but Z = : {_} for Z is simpler
5. are adjoints with only beta contradicting --- later
40. loop w/o smth, no longer hurts
42. change last appl in t_case in dyncore to have only id as args, old
16. PP as i in F_ii to allow mutally recursive types, e.g in dynEDule!
33. error instead of fb when cyclic type abbreviation, based on free vars
36. remove src and dom from ToolLCore and DynECore 
43. optimize from ToolLCore to DomEDule
12. is cheking modules in ElabSDule doable in ElabLDule, no: Comp-2-args,
    yes: products cannot be defined more, in this Core category
51. possibly Record only when closed, now close to being catesian, good
56. perhaps add subtyping to funct and trans, and not only dule, too complex
91. perhaps compile MDUle to SDule with module type-reconstruction
93. maybe always enter link with empty pe
76. finish type-checking in SDule --- circularity --- too long
57. understand levels, SELF, RIGHTA in prep.ml and simplify
81. enable testing runs with ElabLDule on, etc.
49. maybe add src to category, maybe also paf and fig
96. repair map or generalize product --- only needed for monstrous folds
117. parsing of LDule, for separate compilation --- w/o sharing too large
106. combine record f lt, pr likes dom; in, con likes cod, etc. --- complex
115. see why T_ii is not an action of F_ii on transformations --- in a way is
109. draw the diagrams for the pseudo-adjunctions with weak eta --- no
     because subst for _ss are not weak eta
102. make fold end, map end, etc. --- too verbose for typical use
48. variants to SimLTrans: 1.map 2.no map 3.no tl_ and fix instead of fold
135. when doing vmap f_COMP the stamp should be refreshed?
136. simple case with [`Succ n => n + 1] and let f = n => n .`Succ?
53. add a variant to SemETrans with case, fold taking an open term
104. is_trivial? are changes needed in unify now after eta-reduction? No-BB.
156. remove `OK from elabEDul --- at the cost of allowing repeated ids
155. check S_Mm(S_Mm(..)) --- not important
154. Hashtbl.replace for add, maybe
157. %think about S_Bb (r, ...) as S_Bb (M_Id r, ...)
     %and ww(m, bb (r, ...)) as bb (m, ...)
150. should Trim only work for Bb sigs? --- no, for Vars as well!
86. is every automatic or reconstructed signature expressible? - no such:)
119. (* why this wrong:  Result = Outcome *) in List22 --- no longer
100. perhaps make el_dule give r not lr to increase sharing --- who cares
180. do I assume in Ww that context of a signature is a Pp? No.
     If not perhaps change the examples in semantics of s_WW in thesis. No.
172. perhaps [value e = ...] in tutorial of the core language?

