forked from mason-stewart/agda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
336 lines (190 loc) · 8.07 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
Features
--------
* remembering the last thing in scope when computation gets stuck
* debug information
* Use substitutions for meta dependencies (at least for printing). We'll need
to remember the number (or names?) of dependency args. How to show that a
meta variable cannot depend on a particular variable?
* lazy evaluation (or call by value?)
* unify primitive and {-# BUILTIN #-}
* allow module instantiation before top-level module(?)
* abstract open (need to re-type check to make sure the abstraction is solid)
* extend positivity check to handle function calls
* mutual modules
* more liberal builtin bindings (Nat as a special case of a general sequence)
User interface
--------------
* Highlighting fixity declarations and all module names.
* Point warping for record fields.
* locally nameless representation
Fixes
-----
[Errors]
* DeclarationException when missing a type signature
[Parsing]
* allow more things in postulates (infix, private, ..)
* allow fixity declarations for record fields (where?)
* allow postulates in mutual
* Check out lex/parse errors (what position and what input is reported).
* Enable parsing of non-trivial literate files (see
examples/syntax/highlighting/Test.lagda).
[Serialisation]
[Printing]
* print patterns in mixfix notation (AbstractToConcrete)
* meta variables are printed with their lambda lifted types
[Scope]
* check that fixity declarations correspond to actual definitions
* change syntax for fixity declarations (infix is a bit strange for prefix and
postfix operators)
[Evaluation]
* literal patterns are considered neutral when deciding if a match is No or DontKnow
example
funny : (A : Set) -> A -> D A -> ..
funny .Nat zero nat
funny .String "foo" string
Here
funny String "foo" string
doesn't reduce because we DontKnow that "foo" doesn't match zero.
[Type checking]
* implicit function spaces and records interact badly with meta variables
solution: postpone type checking problems
- postpone checking of lambda against blocked types
- postpone checking of applications where the function has a blocked type
- postpone checking of records against blocked types
[Testing]
* write better tests
[Bugs]
* The Emacs interface meta variable treatment leads to problems with
the syntax highlighting/point warping. Fix this by doing most work
on the Haskell side, using the syntax tree, instead of mucking
around with regular expressions on the Emacs side.
Currently there are two known bugs:
1) _All_ question marks are treated as meta variables.
2) After a question mark has been converted into {! !} the point
warping does not work (the offsets into the file have changed).
* importing A after importing A.B causes a clash
* Too many open files
* Evaluation of _==_ loops on something like this:
open module Eq = Equivalence (Eq'{ℂ}{A}{B}) renaming (_==_ to _=='_)
f == g = .. ==' ..
* There's a bug in the import chasing where a module can be imported before
it's type checked. I.e. an old version of the module is stored in an
interface file of a different module and we can't see that it's not
up-do-date.
I think this is what happens in the polydep example if everything is
up-to-date except TYPE.agda.
[Interaction]
[Errors]
* Remember/figure out range of previous binding in DuplicateBuiltinBinding.
* wrong "When..." reported for f (g x) if g x is well-typed but of wrong type.
* ranges of constructors in patterns are wrong. (also in right-hand sides?)
* give sensible message for too few arguments to constructor in pattern
[Type checking]
* When do we have to turn on abstractMode. When checking anything public? Not
done at the moment.
[Imports]
* handle clashing builtin things
* create interface for top-level module (not so important)
* allow the source to not exist if there is an interface file
(what if it needs rebuilding? throw error)
[Builtin]
* check that bindings to list and bool binds to datatypes of the right shape
[Misc]
* Allow qualified names in BUILTIN pragma. Currently pragmas are parsed as
plain strings, so a qualified name is interpreted as an unqualified name
containing a dot.
* check that the module name matches the file name. Also when importing the
module name should be the one we're trying to import.
* Allow modules to be called things like Prop and Set (?)
* Move large parts of the Makefiles to mk/rules.mk (or something)
Speculative
-----------
* make scope checking aware of abstract? or maybe this is too much work
Cleaning
--------
* TypeChecking.Reduce
- Explicit dictionaries (Kit)? see notes/kit
* Split vim highlighting into a general highlighting module and the vim
specific parts.
Performance
-----------
* Check what's taking time with new meta var/constraint handling
* a lot of memory created by subst is never used
* space leak in lexer (positions too lazy?)
Done
----
* pattern coverage
* with-clauses
* better algorithm for pattern matching on inductive families
* structured verbosity
* records
* implemented the CHIT-CHAT module system
* polymorphic constructors at run-time (at least at conversion checking)
* Split TypeChecking.Errors into TypeChecking.Pretty and TypeChecking.Errors
* inductive families with pattern matching
* build agda as a package to speed up loading into ghci
* OpenTerm type to simplify deBruijn variable handling
* Monad transformer for checking patterns.
* pretty printing of operator applications
* named implicit arguments, see notes/named-implicit
* Use Data.ByteString (if ghc-6.6) for interface parsing (faster, but still quite slow)
* optimized natural numbers, user view is still zero/suc.
* allow reexporting of things using 'open Foo, public'
* allow import and open before the top level module.
* checking that underscores have been solved (only in batch mode)
* syntax highlighting
* proper make test (agda now exits with failure on error)
* failing test (like in agdaLight)
* throwing not-in-scope error rather than no parse for application wheneven possible
* use interface files in scope checking
* check for cyclic imports (we need to use interface files when scope checking)
* removed list sugar (and made [ and ] valid in names)
* create interface files when importing
* allowing lambda-bound operators by always writing _+_ (hence making underscore
in names carry semantics).
* allow no type signatures for definitions of the form x = e
* mix-fix operators
* list sugar
* handle absurd patterns
* literal patterns
* literals
* built-in things
* pragmas
* move trace to environment
* name suggestions in telescopes
* forall x y z -> A = (x:_)(y:_)(z:_) -> A
* cleaning up of TypeChecking.Monad.*
* Context to abstract thinks that the types are valid in the entire context.
* Hiding info on lambdas.
* flag for printing all implicit arguments (handled in internal to abstract)
* proof irrelevance
* Prop <= Set
* sort checking of datatypes check that all constructor arguments fit inside
the datatype sort (rather than checking that the types of the constructor fit)
* let-bindings (only x = e definitions)
* insertion of hidden lambdas when appropriate
* optimise
* for an as-pattern x@p x should reduce to p during type checking
* as-patterns
* split TypeChecking.Monad.Context
* better names for implicit args in lhs
* replace explicit Hidden with Arg in Pi and App (and more?)
* independent functions in Type
* local functions
* speed up normalise
* getopts
* When instantiating a module we should generate functions for the axioms and
constructors and probably for everything else as well (reducing to the
instantiated versions from the instantiated module). Together with
monomorphic constructors.
* Monomorphic constructors.
* ? should not be a valid operator characted
* actually check sorts
* Get rid of distinction between hole and underscore. Instead keep a separate
list of which metas are interaction points.
* Blocked constructor in Terms and Types
* insert hidden arguments in lhss
* ranges in error messages
* abstract info on constraints (TCEnv instead of Context) and interaction meta
vars.
vim: sts=2 sw=2 ts=80