Folkert
0bdda2506c
add update mode to reset and reuse
2021-11-28 14:13:02 +01:00
Folkert
1241d5ccbd
make UpdateModeIds a proper type
2021-11-28 14:03:48 +01:00
Folkert de Vries
8eb74da0f3
Merge pull request #2083 from rtfeldman/layout-soa
...
Layout Struct of Arrays
2021-11-28 12:43:37 +01:00
Richard Feldman
f80409800d
Merge pull request #2091 from rtfeldman/remove-empty-layouts
...
Remove empty layouts
2021-11-27 23:32:15 -05:00
Brendan Hansknecht
eff4da1938
appease clippy
2021-11-27 17:03:55 -08:00
Brendan Hansknecht
55f0329e5c
Merge remote-tracking branch 'origin/trunk' into gen-dev/remove-results
2021-11-27 16:57:00 -08:00
Brendan Hansknecht
a63dd1eb61
use unimplemented! and internal_error! instead of result in dev backend
2021-11-27 12:38:29 -08:00
Brendan Hansknecht
57d9ce3fdd
Merge pull request #2043 from rtfeldman/dev-backend-num-is-zero
...
add x86_64 Int is zero support for gen_dev
2021-11-27 09:53:59 -08:00
Folkert
3d1035a11f
fix bug with lists and * type variables
2021-11-27 16:57:50 +01:00
Folkert
79d5c82dfb
cleanup
2021-11-27 16:36:43 +01:00
Folkert de Vries
d0da22edfa
Merge pull request #2089 from rtfeldman/joshuawarner32/fix-backpassing-formatting
...
Fix formatting of applies in backpassing
2021-11-27 15:46:10 +01:00
Joshua Warner
02b51bcd37
Fix formatting of applies in backpassing
2021-11-27 06:15:48 -08:00
Folkert
a1fd34feef
remove empty layout types (list,str,dict,set)
2021-11-27 14:05:16 +01:00
Richard Feldman
b96d95ab1b
Merge pull request #2088 from rtfeldman/joshuawarner32/fix-unary-parens-formatting
...
Make sure unary operators around function calls get parens
2021-11-27 01:48:15 -05:00
Joshua Warner
e9d22699ed
Make sure unary operators around function calls get parens
2021-11-26 20:01:45 -08:00
Richard Feldman
d39ecfd12d
Merge pull request #2052 from rtfeldman/i/1931-2
...
Some improvements to error messages regarding unbound type variables
2021-11-26 21:17:37 -05:00
Richard Feldman
262f1600d4
Merge pull request #2086 from rtfeldman/solve-unify-allocation
...
Type checking allocation tweaks
2021-11-26 21:09:05 -05:00
Folkert
6934e69240
make deep_copy_var_to allocate less
2021-11-27 02:09:08 +01:00
Folkert
ed455777a2
give deep_copy_var_to a scratchpad
2021-11-27 01:42:11 +01:00
Folkert
471593ea31
make deep_copy_var use scratchpad arena
2021-11-27 01:32:47 +01:00
Folkert
2d0d54e13e
try stack allocation for small vectors
2021-11-27 01:31:48 +01:00
Brian Carroll
a9456639c7
Fix a bug in LLVM backend refcounting
2021-11-27 00:10:54 +00:00
Richard Feldman
74b8076bab
Merge pull request #2081 from rtfeldman/joshuawarner32/private-tag-fmt
...
Fix formatting of private tags
2021-11-26 18:03:31 -05:00
Richard Feldman
e2e095eb69
Merge pull request #2079 from rtfeldman/joshuawarner32/type-apply-package-name-fmt
...
Fix formatting in the presence of a pkg name in TypeAnnotation::Apply
2021-11-26 18:02:51 -05:00
Joshua Warner
32a8222a37
Add test for formatting package type in TypeAnnotation::Apply
2021-11-26 13:58:17 -08:00
Joshua Warner
799e340c01
Fix formatting of private tags
2021-11-26 13:50:12 -08:00
Folkert
48368f4fba
fix imports
2021-11-26 22:33:10 +01:00
Richard Feldman
8d668514e4
Merge pull request #2080 from rtfeldman/joshuawarner32/if-else-fmt
...
Fix formatting of if/else chains
2021-11-26 15:46:18 -05:00
Folkert
a3b3f5e970
Merge remote-tracking branch 'origin/trunk' into layout-soa
2021-11-26 21:41:25 +01:00
Folkert
6c1f3eedb7
dict and set layouts
2021-11-26 21:39:36 +01:00
Folkert
047514bf39
flesh out FunctionLayout and LambdaSet
2021-11-26 20:55:12 +01:00
Joshua Warner
a7e4861956
Fix formatting of if/else chains
2021-11-26 11:03:45 -08:00
Joshua Warner
08e8b93bb6
Fix formatting in the presence of a package name in TypeAnnotation::Apply
2021-11-26 11:03:01 -08:00
Joshua Warner
27b83650ba
Fix indent formatting in Def::AnnotatedBody
2021-11-26 10:21:38 -08:00
Richard Feldman
2939780638
Merge pull request #2076 from rtfeldman/variable-subs-slice
...
Variable subs slice cleanup
2021-11-26 07:38:27 -05:00
Folkert
891c879439
most of the conversion
2021-11-25 23:27:59 +01:00
Folkert
b8eed51611
first attempt at layout soa
2021-11-25 22:09:20 +01:00
Folkert
b4f21930bb
cleanup
2021-11-25 20:49:44 +01:00
Folkert
612f868652
make VariableSubsSlice an alias
2021-11-25 20:29:34 +01:00
Folkert
69a80872e1
rename start -> index
2021-11-25 19:46:05 +01:00
ayazhafiz
d352d2cdf8
Revert "Include annotation type signatures in Expected
struct"
...
This reverts commit 6e4fd5f06a1ae6138659b0073b4e2b375a499588.
This idea didn't work out because cloning the type and storing it on a
variable still resulted in the solver trying to uify the variable with
the type. When there were errors, which there certainly would be if we
tried to unify the variable with a structure that had nested flex/rigid
vars, the nested flex/rigid vars would inherit those errors, and the
program wouldn't typecheck.
Since the motivation here was to expose the signature type to
`reporting` so that we could modify it with suggestions, we should
instead pass that information along in something analogous to the
`Expected` struct.
2021-11-25 13:24:42 -05:00
ayazhafiz
a8e38172ac
Remove redundant refs
2021-11-25 11:22:19 -05:00
Joshua Warner
f25323e8a7
Implement platform header formatting
2021-11-25 08:19:31 -08:00
ayazhafiz
ba678d924d
Remove unused variables
2021-11-25 11:16:18 -05:00
ayazhafiz
31d4536449
Remove variable that no longer exists
2021-11-25 11:16:18 -05:00
ayazhafiz
fe85af8d03
Fix failing compilation in Expr2
2021-11-25 11:16:18 -05:00
ayazhafiz
3f3a34382c
Suggest non-conflicting type variable name for wildcard renaming
...
There is still a potential for conflicts here, because we don't look at
type variables introduced _prior_ to this annotation. However, this
should be okay in most cases.
2021-11-25 11:16:18 -05:00
ayazhafiz
ee34e79790
Include annotation type signatures in Expected
struct
...
To provide better error messages and suggestions related to changing
type annotations, we now pass annotation type signatures all the way
down through the constraint solver. At constraint generation we
associate the type signature with a unique variable, and during error
reporting, we pull out an `ErrorType` corresponding to the original type
signature, by looking up the unique variable. This gives us two nice
things:
1. It means we don't have to pass the original, AST-like type
annotation, which can be quite large, to everyone who looks at an
expectation.
2. It gives us a translation from a `Type` to an `ErrorType` for free
using the existing translation procedure in `roc_types::subs`,
without having to create a new translation function.
2021-11-25 11:16:17 -05:00
ayazhafiz
817bb22f9e
Improve error message when we try to unify two wildcards
...
Closes #1931
2021-11-25 11:15:31 -05:00
ayazhafiz
62873fed81
Propogate original annotation region down in AnnotationSource
...
This makes it easier for error reporting to find the relevant
annotations that were part of a type error, and display that in the
error message presented to a user.
2021-11-25 11:15:31 -05:00