Commit graph

19 commits

Author SHA1 Message Date
ayazhafiz
9f72b2710f Run linter 2022-02-01 22:49:52 -05:00
ayazhafiz
e03592930f Typecheck numeric literals with suffixes in expressions
Part of #2350
2022-02-01 22:49:50 -05:00
ayazhafiz
4e942b3e5d Make nested datatypes into errors
I was hoping to add nested datatypes into the language, but it turns out
doing so is quite tricky and not all that useful with Roc's current
compilation model. Basically every implementation strategy I could think
of ended up requiring a uniform representation for the data layout
(or some ugly workaround). Furhermore it increased the complexity of the
checker/mono IR generator a little bit - basically, we must always pass
around the alias definitions of nested datatypes and instantiate them
at usage sites, rather than being able to unroll aliases as we currently
do during canonicalization.

So, especially because we don't support polymorphic recursion anyway, I
think it may be better to simply disallow any kind of nested datatypes
in the language. In any case, Stephanie Weirich [seems to think nested
datatypes are not needed](https://www.cis.upenn.edu/~plclub/blog/2020-12-04-nested-datatypes/).

Closes #2293
2022-01-31 22:58:01 -05:00
Folkert
4cefbec5c7 store lambda set in alias types 2021-07-28 15:26:25 +02:00
Anton-4
314503cf7f fixed typos, added typos checking to CI 2021-06-05 20:02:54 +02:00
Folkert
86ffd430d7 introduce missing var 2021-05-05 21:35:39 +02:00
rvcas
b510d6e94d fix: float error in repl 2020-12-30 20:47:11 -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
791a0e9404 Use precision in mono/ir to determine which number to generate 2020-12-29 09:33:55 -06:00
Jared Ramirez
48f964adf4 Add percision variable in fp/integer eq constraints 2020-12-28 16:22:34 -06:00
rvcas
c9308c0662 add new layer to the Num types 2020-12-21 09:56:11 -05:00
rvcas
4987721154 feat(Num): rename Num.Int to Num.I64 2020-12-07 19:17:20 -05:00
rvcas
f7bd803509 feat(Num): rename Float to F64 2020-11-24 10:25:21 -05:00
Folkert
8b3b677439 remove aliases from Let and LetCon 2020-10-31 15:27:24 +01:00
Folkert
8a50d48ce2 expand aliases used in constraint gen 2020-10-29 22:31:14 +01:00
Richard Feldman
88990c8711 Move Int and Float modules into Num 2020-06-22 23:25:38 -04:00
Folkert
106a3646bf add category to Eq constraint 2020-04-01 20:09:10 +02:00
Richard Feldman
908e485fca Move constrain and its deps into their own crates 2020-03-06 01:43:39 -05:00
Renamed from compiler/src/constrain/builtins.rs (Browse further)