Commit graph

328 commits

Author SHA1 Message Date
Richard Feldman
8ec7b26a1c
Merge pull request #2547 from rtfeldman/simplify-editor
simplify editor
2022-02-27 21:43:09 -05:00
Anton-4
985af24071
added reference to created issue for update_key 2022-02-21 17:20:19 +01:00
Anton-4
48d5775f62
simplification, stricter adherence to projectional editing approach 2022-02-21 14:47:57 +01:00
Jan Van Bruggen
e12d98af98 WIP: Start adding new Int.toInt builtins 2022-02-19 11:28:12 -05:00
Jan Van Bruggen
14ef9be3d2 Sort Num.(min/max)* builtin symbol defs 2022-01-22 00:19:17 -07:00
Jan Van Bruggen
9a8a4c6ed7 Add Num.(min/max)(I/U)(8/16) builtins 2022-01-22 00:19:17 -07:00
Eric Newbury
a96d5e6abf Merge branch 'trunk' into enewbury/list-sort-desc 2022-01-21 17:06:52 -05:00
Eric Newbury
7e7104d9ba WIP 2022-01-21 16:46:47 -05:00
Eric Newbury
05c01a81f5 adding List.sortAsc builtin 2022-01-21 15:34:24 -05:00
Richard Feldman
eacbb956cf
Merge pull request #2360 from rtfeldman/builtins-using-builtins
using builtins from builtins
2022-01-20 18:20:50 -05:00
Brian Hicks
f2ae02213a remove deprecated symbols and reorder remainder 2022-01-20 08:29:30 -06:00
Jan Van Bruggen
8e4b6f0cab Remove Num.(min/max)Int
Replace all uses with `Num.(min/max)I64`,
since all uses expect an `I64`.
2022-01-19 09:55:06 -07:00
Jan Van Bruggen
591477e77b Add most remaining Num.min/max* builtins
This skips `min/maxU128`, as they require a subtle change
to the `I128`-centric implementation of `Int`s.
2022-01-17 15:26:23 -07:00
Folkert
697a65e77c builtins can use builtins now 2022-01-16 22:28:36 +01:00
Jan Van Bruggen
d7e2be306f WIP: Add Num.minI128 builtin (TODOs remain) 2022-01-15 17:49:15 -07:00
ayazhafiz
2c41c43aea Implement saturated add/subtract 2022-01-10 22:37:08 -05:00
ayazhafiz
ed64ff912a Implement List.dropIf
This was referenced in the `List` documentation and in the
[tutorial](./TUTORIAL.md), but wasn't actually implemented prior to this
commit!

Part of #2227
2021-12-22 12:34:48 -06:00
Jan Van Bruggen
d03a51c75b Rename base package to pf everywhere, to match tutorial 2021-12-12 05:57:39 -07:00
rvcas
b7d48b2fe1 feat: add the rest of the num types for Str conversion 2021-12-06 23:24:02 -05:00
rvcas
e587e20de2 feat: switch to using a builtin per num type to convert from a string 2021-12-06 22:24:00 -05:00
Anton-4
eaf4e57759 started on Str.toNum 2021-12-01 15:15:30 +01:00
rvcas
f995a07029 feat: Num.toStr
* add type for Num.toStr
  * create new lowlevel
  * delete types and Symbol for fromInt and fromFloat
  * leave LowLevel::{StrFromFloat,StrFromInt}
  * match on LowLevel::NumToStr and figure out the layout to decide
    which build function to delegate to
2021-11-30 14:52:06 -05:00
satotake
4376db6c17 use load_literal 2021-11-23 10:09:53 +00:00
Richard Feldman
49fd864a2f
Merge pull request #1996 from rtfeldman/add_list_all
adding List.all
2021-11-19 17:55:04 -05:00
Folkert de Vries
a58c999d3e
Merge pull request #2008 from rtfeldman/improve-typo-suggestions
Minor improvements to "did you mean?" suggestions provided for missing identifiers
2021-11-19 10:24:52 +01:00
ayazhafiz
fe99d20be5 Apply review suggestions 2021-11-18 21:49:37 -05:00
Michael Downey
d11bb93539
Merge branch 'trunk' into add_list_all 2021-11-18 16:09:24 -05:00
Folkert de Vries
a4fc813ca3
Merge pull request #2002 from rtfeldman/builtins-list-intersperse
Add builtin `List.intersperse`
2021-11-18 22:00:10 +01:00
Folkert
947051749d fix typo 2021-11-18 13:17:29 +01:00
Folkert
f99542f066 add special symbol for removed specializations 2021-11-18 13:15:00 +01:00
Michael Downey
9d587d37b4
Merge branch 'trunk' into add_list_all 2021-11-18 06:41:08 -05:00
satotake
ce8a88416d Merge branch 'trunk' into builtins-list-intersperse 2021-11-18 11:16:27 +00:00
ayazhafiz
c156f61b0f Suggest tags of primitive types when an ident is misspelled
With this change, mispellings of things like `true` and `false` will
include a hint to the user that they may want to use `True` and `False`,
respectively, instead.

There are a few ways to implement this, but exposing these common tags
(which compose builtin type aliases) seems the easiest, least expensive,
and doesn't break anything for now.
2021-11-17 22:40:51 -05:00
satotake
16fb04b4fa Add builtin List.intersperse 2021-11-17 15:18:45 +00:00
Michael Downey
d946b84e63 adding initial List.all 2021-11-16 16:34:36 -05:00
satotake
46e6e22776 use closure 2021-11-16 12:58:45 +00:00
satotake
541465bc2e Use let 2021-11-16 11:13:37 +00:00
satotake
73dda714de Add builtin List.split 2021-11-15 13:50:11 +00:00
Theo Felippe
8d7c252fce implemented Str.trimRight 2021-11-13 18:02:58 +00:00
Theo Felippe
10eab4b785 implemented Result.isErr 2021-11-13 08:29:40 +00:00
Brian Carroll
daf6771bf5 Shorten the name of the Symbol for temporary Wasm values 2021-11-12 17:51:50 +00:00
Theo Felippe
84af26d813 added placeholder implementation 2021-11-11 19:13:42 +00:00
Folkert de Vries
b3a663a741
Merge branch 'trunk' into builtins-list-sublist 2021-11-10 16:28:58 +01:00
satotake
9f5d3f521b Implement List.sublist 2021-11-10 13:16:57 +00:00
Michael Downey
07cd3850d7
Merge branch 'trunk' into str_trim_left 2021-11-09 19:43:26 -05:00
Michael Downey
1bc278d962 initial commit of Str.trimLeft 2021-11-09 14:25:24 -05:00
Folkert
94efbd0e95 Merge remote-tracking branch 'origin/trunk' into builtins-list-take-last 2021-11-09 16:18:19 +01:00
satotake
772fc9c021 Implement List.takeLast 2021-11-09 12:26:17 +00:00
ayazhafiz
f65b174ab5 Implement List.find
`List.find : List elem, (elem -> Bool) -> Result elem [ NotFound ]*`
behaves as follows:

```
>>> List.find [1, 2, 3] (\n -> n > 2)
Ok 2
>>> List.find [1, 2, 3] (\n -> n > 4)
Err NotFound
```

We implement this as builtin in two phases. First, we call out to a
pure-llvm-lowlevel `ListFindUnsafe` that returns a record indicating
whether a satisfying element was found, and the value of that element
(the value is all null bytes if the element wasn't found). Then, we lift
that record to a `Result` via a standard construction of the can AST.

Closes #1909
2021-11-08 21:03:14 -05:00
satotake
9087bf7273 Merge branch 'trunk' into builtsins-list-take-first 2021-11-08 14:32:36 +00:00