Folkert
1fb746757c
pipe module name into canonicalization of modules
2022-02-02 16:01:31 +01:00
ayazhafiz
320827167f
Parse number literal width suffixes
...
Supports [u,i][8,16,32,64,128] and [nat,dec]
Part of #2350
2022-02-01 22:48:48 -05:00
Folkert
b3d605cade
fix failing debug_assert
2022-01-26 20:22:18 +01:00
Folkert
0298013346
fix logical error
2022-01-26 17:03:49 +01:00
ayazhafiz
0eede1cd86
Generate unique symbols for shadowing identifiers
...
This code has a shadowing error:
```
b = False
f = \b -> b
f b
```
but prior to this commit, the compiler would hit an internal error
during monomorphization and not even get to report the error. The reason
was that when we entered the closure `\b -> b`, we would try to
introduce the identifier `b` to the scope, see that it shadows an
existing identifier, and not insert the identifier. But this meant that
when checking the body of `\b -> b`, we would think that we captured the
value `b` in the outer scope, but that's incorrect!
The present patch fixes the issue by generating new symbols for
shadowing identifiers, so deeper scopes pick up the correct reference.
This also means in the future we may be able to compile and execute code
with shadows, even though it will still be an error.
Closes #2343
2022-01-23 12:35:31 -05:00
Folkert
697a65e77c
builtins can use builtins now
2022-01-16 22:28:36 +01:00
Joshua Warner
bd7b1e5013
Make Loc::new take Positions
2022-01-01 18:20:05 -08:00
Joshua Warner
f19220473a
Rename Located -> Loc
2021-12-22 19:18:22 -08:00
Chelsea Troy
6cf755ad8d
Resolve a bunnnch of merge conflicts
2021-11-29 23:14:29 -06:00
Brendan Hansknecht
d49ac68bcc
Update dep with major version changes
2021-11-05 19:19:37 -07:00
Folkert
a15183a7d1
refactor
2021-11-03 14:09:04 +01:00
Eric Correia
8272ea876f
Get it all to compile!
2021-10-02 13:48:07 -04:00
Jared Ramirez
d69b9173fc
Also store f64 for things like pattern comparisons, etc
2021-08-18 17:18:13 -07:00
Folkert
ceb5cc66fa
use IdentStr
2021-08-03 21:14:36 +02:00
Richard Feldman
e8fc9c5e4c
Thread dep_idents through to LoadedModule
2021-08-01 10:23:16 -04:00
Richard Feldman
5c74bab0ec
Persist scope after canonicalizing defs
2021-08-01 10:23:16 -04:00
Chadtech
ac7386fd27
Merge branch 'trunk' into hash-links
2021-05-24 09:14:52 -04:00
Chadtech
12c0067348
Created scope and idents for module docs, but they appear to be empty when the doc links function tries to use them
2021-05-22 14:06:56 -04:00
Eric Henry
d34f984169
Starting to add no arg tag union
2021-05-17 17:07:19 -04:00
Folkert
48f392f372
fix bad test examples using unbound type alias variables
2021-05-05 19:54:10 +02:00
Folkert
9b0e14ef4c
treat wildcards as rigids
2021-05-03 20:39:29 +02:00
Folkert
95fbc15373
add test
2021-04-23 11:27:36 +02:00
Folkert
ed7906ccbb
fix canonicalization
2021-04-23 09:24:11 +02:00
Folkert
112e97c4a2
improve circular definition error reporting
2021-04-10 21:39:20 +02:00
Folkert
469bbae2f1
make type aliases unqualified importable
2021-03-02 14:48:44 +01:00
Chadtech
a1add5c1b3
Fix argument parity issues for some functions
2021-02-04 01:04:08 -05:00
Chadtech
a46a7ef06a
builtin_defs_map passed in explicitly in many places that want to monomorphize, so that we can use a new test_builtin_defs in tests. Hash test works
2021-01-18 22:38:51 -05:00
Chadtech
dd2dcc63d1
Pass in builtin look up function parameter
2021-01-18 21:25:10 -05:00
rvcas
c33cab57f2
Merge branch 'int-float-size-gen' into temp_numbers
2020-12-30 19:41:44 -05:00
rvcas
127c4e1bcc
feat: add inner var to IntLiteral and FloatLiteral
2020-12-29 20:52:54 -05:00
Jared Ramirez
48f964adf4
Add percision variable in fp/integer eq constraints
2020-12-28 16:22:34 -06:00
Folkert
0099e3e9fd
rely on the symbol -> var mapping from solving; don't extract var from the def itself
2020-12-26 17:39:16 +01:00
Folkert
0d17e9a879
only store exposed symbols in Module
2020-12-26 17:18:03 +01:00
Richard Feldman
6883f57543
If we hit ExposedButNotDefined, gen a RuntimeError
2020-12-11 21:13:55 -05:00
Richard Feldman
ed222912b3
Report exposed-but-not-defined symbols
2020-12-10 23:59:15 -05:00
Folkert
d7449482c3
clippy
2020-12-10 02:47:45 +01:00
Folkert
16994cfaf7
shrink number of used variables (by a lot)
2020-12-10 00:13:09 +01:00
Folkert
7123269f30
successfully load package-qualified host
2020-12-07 23:24:06 +01:00
Folkert
1471cd0db4
error message investigation
2020-12-06 21:19:52 +01:00
Folkert
063492680f
recursive functions cannot capture other recursive functions from their LetRec
2020-11-09 15:54:02 +01:00
Folkert
3cd132dd51
introduce foreign call
2020-11-05 23:35:56 +01:00
Folkert
8b3b677439
remove aliases from Let and LetCon
2020-10-31 15:27:24 +01:00
Folkert
247071668e
import aliases and put them in the scope
2020-10-30 19:59:09 +01:00
Folkert
b75880bed2
expand aliases before/during canonicalization
2020-10-29 22:33:18 +01:00
Folkert
047746c716
use only references (no Vec) in canonical AST
2020-10-29 00:12:44 +01:00
Richard Feldman
6b183b1bcc
Handle builtin defs in canonicalize_module_defs
2020-10-25 01:42:10 -04:00
Folkert
defa408e83
clippy fixes
2020-10-17 00:40:01 +02:00
Folkert
cbe78593c2
add extra pass that further trims down the captured symbols
2020-10-17 00:17:55 +02:00
Folkert
30ff471a1b
appease clippy
2020-10-12 22:19:13 +02:00
Folkert
2df86b6438
fix uniqueness bug
...
builtin defs were included twice, which threw off uniqueness inference
2020-10-12 22:16:10 +02:00