7afcbfe258
recognise nats other than 0 in eq checker
2023-12-21 17:48:12 +01:00
03c197bd04
add local bindings to context
...
- without this, inside the body of `let x = e in …`, the typechecker
would forget that `x = e`
- now bound variables can reduce, if they have a definition, so RedexTest
needs to take the context too
2023-12-07 01:43:39 +01:00
0514fff481
represent ℕ constants directly
...
instead of as huge `succ (succ (succ ⋯))` terms
2023-11-03 18:05:54 +01:00
fa7f82ae5a
rename Nat to NAT in AST
2023-11-03 18:05:54 +01:00
e0ed37720f
always vsep scheme lets, otherwise they are unreadable
2023-11-03 18:05:54 +01:00
0c1df54d62
improve handling of context lengths
2023-11-03 18:05:54 +01:00
9cbd998d6f
simplify isEmpty and isSubSing
2023-11-03 18:05:54 +01:00
ebde478adc
add η for pairs in zero contexts
2023-09-19 00:41:17 +02:00
bb8d2464af
add fst and snd
2023-09-18 21:53:38 +02:00
e6c06a5c81
pass the subject quantity through equality etc
...
in preparation for non-linear η laws
2023-09-18 21:53:38 +02:00
3fe9b96f05
make function types with an empty domain subsingletons
...
this is useful for the base cases of W types when i try those again
closes #23
2023-09-17 20:10:51 +02:00
244b33d786
fix some comments
2023-09-17 19:11:20 +02:00
b85dcb5402
η for box
...
fixes #27
2023-09-17 19:11:12 +02:00
fa14ce1a02
add FreeVars, and split only on used dvars in Equal
2023-09-12 09:56:49 +02:00
9973f8d07b
refactor elim equality error stuff
2023-09-12 06:48:51 +02:00
1e8932690b
untangle big mutual block in Equal
2023-08-28 22:07:57 +02:00
add2eb400c
make Elim.compare0 able to pass a type to isSubSing
...
it now recovers from (most) errors and always returns a type, so that
isSubSing doesn't have to recalculate it
it already assumed the inputs had the same type. now it just leans on
that assumption harder
2023-08-28 20:00:54 +02:00
72609bc12f
Elim.compare0 infers the type
...
instead of calling computeElimType over and over. now there's just one
at the start
2023-08-27 19:05:25 +02:00
3e3bf1b67f
factor out this case !mode of {..}
stuff
2023-08-27 19:04:30 +02:00
edfe30ff63
update compare0 for type-directed whnf
2023-08-26 21:32:15 +02:00
a221380d61
more effect stuff, incl. ST
2023-08-25 18:59:54 +02:00
4b6b3853a1
make uses of eff more consistent
2023-08-24 19:55:57 +02:00
fa09aaf228
squash warnings
2023-06-23 18:32:05 +02:00
f0d3529f63
fix subtype stuff for Eq
2023-06-22 22:20:12 +02:00
42aa07c9c8
crude but effective stratification
2023-05-21 20:34:05 +02:00
e4a20cc632
remove redundancy in equality check
2023-05-20 21:38:23 +02:00
d5f4a012c5
add source locations to inner syntax
2023-05-02 03:06:25 +02:00
b666bc20cf
do scope checking in FromParser where it belongs
2023-04-18 22:55:23 +02:00
4578b30c79
namespaces work now
2023-04-18 00:10:53 +02:00
a5ccf0215a
coercions and compositions
2023-04-15 15:13:01 +02:00
a42e82c355
type-case
2023-04-03 17:46:23 +02:00
e1dbf272df
rename EqualE to just Equal & add runEqual
2023-04-02 15:52:55 +02:00
ba2818a865
remove IsQty interface
2023-04-01 19:16:43 +02:00
2b2f79fca9
fix some typing mistakes
2023-03-31 19:26:55 +02:00
36609713ac
mtl ⇒ eff
2023-03-31 19:26:24 +02:00
8a9b4c23dd
box type
2023-03-31 19:26:24 +02:00
137962c176
add missing %default total
2023-03-27 00:07:39 +02:00
9250789219
natural numbers
2023-03-26 14:40:54 +02:00
fae534dae0
tweaks in equality checking
2023-03-26 14:38:37 +02:00
5053e9b234
remove inject stuff
...
injecting from m to (n+m) is just id ::: id ::: ... ::: shift n.
specifically, injecting from 0 is just the shift. so.
2023-03-25 22:44:30 +01:00
6dc7177be5
use NContext/SnocVect for scope name lists etc
2023-03-16 18:18:49 +01:00
32f38238ef
pretty printing errors
2023-03-15 15:54:51 +01:00
86d21caf24
put names into contexts, and contexts into errors
2023-03-14 16:04:41 +01:00
02b94ab705
split check and checkType. UAny is kill
2023-03-05 13:14:25 +01:00
95a6644a6c
rename <&&>/<||> to andM/orM
2023-03-03 12:19:15 +01:00
efca9a7138
add enums, which also need whnf to be fallible :(
2023-02-22 07:45:10 +01:00
0e481a8098
new representation for scopes
2023-02-22 07:40:19 +01:00
1a7efc104e
Replace subst overloading with interfaces too (mostly)
2023-02-20 22:22:49 +01:00
7895fa37e5
Q.S.T.Reduce ⇒ Q.Reduce and make it use Definition directly
2023-02-19 18:54:59 +01:00
85a55f8123
wrap type errors in extra context
2023-02-19 17:54:39 +01:00