Commit Graph

14045 Commits

Author SHA1 Message Date
C-BJ
e0c1d5bcd0
Update FAQ.md 2022-04-10 19:36:41 +08:00
Richard Feldman
ebb03f60dd
Add Nikita Mounier to AUTHORS 2022-04-09 13:23:15 -04:00
Richard Feldman
86ce8c439f
Merge pull request #2822 from rtfeldman/nix-path-error
Give guidance about nix-shell's PATH inside BUILDING_FROM_SOURCE.md
2022-04-09 10:20:07 -04:00
Nikita Mounier
94df530a8d
Change wording using @rtfeldman suggestion.
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2022-04-09 11:07:00 +00:00
Richard Feldman
eb99c2c4ec
Grammar edit
Apparently although both "a homage" and "an homage" are considered grammatically acceptable, the latter is more commonly used.
2022-04-08 23:54:11 -04:00
Richard Feldman
babe281b5d
Merge pull request #2780 from rtfeldman/no-link
Add --no-link flag for more complex linking cases
2022-04-08 23:49:48 -04:00
Nikita Mounier
fa527b1888
Specify that in nix-shell's PATH, usr/bin needs to come after nix-related components
This was the source of quite a head-scratching error when building the compiler, only solved thanks to @ayazhafiz 's insight. Indeed, compilation of `roc_cli` was failing with an obscure error about linking with `cc` and not being able to find `-ltinfo`. Turns out the fix is as trivial as rearranging nix-shell's `PATH` a little.
I feel like nix-shell will become the default for many users who prefer delegating the necessary setup to the repo's script, and I definitely wish I had known about this when I was starting out.

Is this the right place to mention this or should it be somewhere else in the document?
2022-04-08 20:43:58 +00:00
Folkert de Vries
5dc8c852e9
Merge pull request #2815 from rtfeldman/i/2811
Specialize polymorphic values before binding to pattern
2022-04-08 21:44:11 +02:00
Ayaz
69ed0b755a
Merge pull request #2804 from rtfeldman/abilities-canonicalization
Basic canonicalization, error checking for abilities
2022-04-08 12:00:23 -04:00
Ayaz Hafiz
b3aee4ba7c
Fix typecheck error 2022-04-08 08:54:31 -04:00
Ayaz
33a5fc65ce
Update comment 2022-04-08 08:50:31 -04:00
Richard Feldman
8322ed95ed
Merge pull request #2806 from rtfeldman/toF32
Num.toF32/toF64 for LLVM backend
2022-04-08 08:28:07 -04:00
Folkert de Vries
f56652dfa4
Merge pull request #2816 from rtfeldman/i/2797
Generate type variables when there are lots
2022-04-08 09:51:13 +02:00
ayazhafiz
94a5cd3559 Improve shadow errors 2022-04-07 22:38:20 -04:00
ayazhafiz
13a17f1858 Improve error message 2022-04-07 22:26:17 -04:00
ayazhafiz
02e1a98cac Remove redundant member 2022-04-07 22:19:30 -04:00
ayazhafiz
304a32ef0a Typo 2022-04-07 20:51:21 -04:00
Richard Feldman
bfb7bb3874
Update comment 2022-04-07 18:36:33 -04:00
Ayaz Hafiz
17b3c7d8ee
Generate type variables when there are lots
Closes #2797
2022-04-07 17:49:48 -04:00
Ayaz Hafiz
1edbe32252 Fix parse tests 2022-04-07 17:22:05 -04:00
Ayaz Hafiz
1ca3dad1e2 Allow complicated return type 2022-04-07 17:21:17 -04:00
Ayaz Hafiz
73bfff699f Handle symbols that shadow ability member definitions
Just add the shadowing symbol for now. We'll handle checking that a
specialization's type matches the member's type definition in a later
pass, during typechecking.
2022-04-07 17:21:17 -04:00
Ayaz Hafiz
884d07344e Clippy 2022-04-07 17:21:17 -04:00
Ayaz Hafiz
66ec1b4a84 Basic canonicalization and error checking for abilities 2022-04-07 17:21:17 -04:00
Richard Feldman
6adaf0905e
Fix missing * in type annotation 2022-04-07 16:29:17 -04:00
Richard Feldman
4dc7e61f3f
Move conversion tests to test_gen 2022-04-07 16:27:01 -04:00
Richard Feldman
459e3a0afe
Add a bunch of toF32/toF64 repl tests 2022-04-07 16:14:00 -04:00
Richard Feldman
a4233ad661
Add LLVM implementation for toF32/64 2022-04-07 16:13:58 -04:00
Richard Feldman
605a8d39e9
Add some REPL tests for toF32/64 2022-04-07 16:13:57 -04:00
Richard Feldman
cd00a98636
Add toF32/64 and checked versions 2022-04-07 16:13:57 -04:00
Richard Feldman
bd623d65bc
Formatting whitespace 2022-04-07 16:13:57 -04:00
Ayaz
23bc8aab49
Merge pull request #2805 from rtfeldman/type-vs-value-defs
Split up Defs into TypeDef and ValueDef
2022-04-07 14:04:05 -04:00
Ayaz Hafiz
a12e40a310
Specialize polymorphic values before binding to pattern
Closes #2811
2022-04-07 14:03:29 -04:00
Folkert de Vries
b00046321e
Merge pull request #2791 from rtfeldman/wasm-higher-order-calls
Wasm higher order calls
2022-04-07 19:35:55 +02:00
Ayaz Hafiz
c7d439136b
Flip refcount test symbols 2022-04-07 08:54:07 -04:00
Brian Carroll
9116770a00 wasm: Adjust List.map code gen for capacity 2022-04-07 09:29:42 +01:00
Brian Carroll
2b74e55240 Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-higher-order-calls 2022-04-07 09:03:34 +01:00
Ayaz Hafiz
d3b848fa46
Clippy 2022-04-06 22:24:14 -04:00
Ayaz Hafiz
a3ac68a41f
Split up Defs into TypeDef and ValueDef
Just a refactoring PR. This is useful because during canonicalization
we always process type defs first, then value defs. With abilities this
distinction continues to grow; in that case, we have patterns associated
with types that we want to process before patterns from values.
2022-04-06 22:18:57 -04:00
Ayaz
37729c08cc
Merge pull request #2802 from rtfeldman/abilities-multi-def-parse 2022-04-06 14:14:46 -04:00
Richard Feldman
c19f8acb8c
Merge pull request #2781 from rtfeldman/zig-macos
add target triple for zig on macos
2022-04-06 13:43:11 -04:00
Ayaz Hafiz
eee19bba2b
s/demands/members 2022-04-06 11:34:55 -04:00
Ayaz Hafiz
bd8333ebb1
Parse multiple abilities behind each other 2022-04-06 11:20:51 -04:00
Ayaz Hafiz
2dc0445f46
s/AbilityDemand/AbilityMember
This is a better name
2022-04-06 11:20:34 -04:00
Ayaz
d58300e016
Merge pull request #2799 from rtfeldman/i/2583
Unify type alias "real variables"
2022-04-05 18:40:02 -04:00
Ayaz Hafiz
72b93e51f1
Bugfix 2022-04-05 18:08:24 -04:00
Ayaz Hafiz
886e5a0c8f
Don't unify real vars when there are no type variables, or nothing changed 2022-04-05 17:51:30 -04:00
Folkert de Vries
d3a3b6456a
Merge pull request #2800 from rtfeldman/parse-out-dec-suffix
Make sure float suffixes are parsed out after can
2022-04-05 23:43:15 +02:00
Ayaz Hafiz
9fbc525d02
Make sure float suffixes are parsed out after can
Before we hit mono, we need to make sure the suffixes of numeric
literals are parsed out from the literal string, so that we don't try to
parse something whose type we already know but has the extraneous
suffix.

Co'ed with @tagraves
2022-04-05 11:32:34 -04:00
Ayaz Hafiz
163c6b39d6
Unify type alias "real variables"
Turns out that we can't always assume that a successful unification of
type alias type variables means that those aliases had the same real
type from the start. Because type variables may contain unbound type
variables and grow during their unification (for example,
`[InvalidNumStr]a ~ [ListWasEmpty]b` unify to give `[InvalidNumStr,
ListWasEmpty]`), the real type may grow as well.

For this reason, continue to explicitly unify alias real types for now.
We can get away with not having to do so when the type variable
unification causes no changes to the unification tree at all, but we
don't have a great way to detect that right now (maybe snapshots?)

Closes #2583
2022-04-05 11:21:52 -04:00