Commit graph

69 commits

Author SHA1 Message Date
Scott Morrison
904239ae61
feat: upstream some Syntax/Position helper functions used in code actions in Std (#3260)
Co-authored-by: David Thrane Christiansen <david@davidchristiansen.dk>
2024-02-09 10:50:19 +00:00
Joachim Breitner
368ead54b2 refactor: termination_by changes in stdlib 2024-01-10 17:27:35 +01:00
int-y1
ce4ae37c19 chore: fix more typos in comments 2023-10-08 14:37:34 -07:00
Bulhwi Cha
367b38701f
refactor: simplify String.splitOnAux (#2271) 2023-07-19 11:50:27 +00:00
Mario Carneiro
bc841809c2 chore: remove intermediate 2023-06-05 15:50:11 -07:00
Mario Carneiro
2ae78f3c45 fix: tail-recursive String.foldr 2023-06-05 15:50:11 -07:00
Mario Carneiro
e68554b854 fix: use empty string instead of mk 2023-06-05 15:50:11 -07:00
Mario Carneiro
fd72fdf8f8 fix: incorrect utf8 in splitAux 2023-06-05 15:50:11 -07:00
Mario Carneiro
aa60791db3 feat: remove partial in Init.Data.String.Basic 2023-06-05 15:50:11 -07:00
Bulhwi Cha
8d0504b3b7 doc: add docstring to String.next' 2023-05-28 17:32:08 -07:00
Mario Carneiro
7f84bf07ba fix: bug in reference implementation of String.get? 2023-05-15 08:35:20 -07:00
Mario Carneiro
c9e84a6ad6 fix: remove private from string defs 2023-05-05 12:09:38 -07:00
Leonardo de Moura
3e33fcc4f8 chore: use lean_string_utf8_next_fast 2022-11-09 12:06:37 -08:00
Leonardo de Moura
92c03c0050 perf: prepare do add String.next' 2022-11-09 12:00:31 -08:00
Leonardo de Moura
20eeb4202f perf: fast String.get' without runtime bounds check
TODO: naming convention `String.get'` should be called `String.get`,
and we should rename the old `String.get`
2022-11-09 12:00:30 -08:00
Leonardo de Moura
5b1aac7b8f fix: avoid nontermination on non-utf8 input
This is not a perfect solution, but ensures the non-termination does
not happen. The changes also make it easier to prove termination in
the future.

TODO: validate UTF8 input?

closes #1690
2022-10-06 17:45:21 -07:00
E.W.Ayers
4ea4365354 doc: various String docstrings 2022-08-26 20:49:57 -07:00
Leonardo de Moura
1caff852fb chore: remove getOp functions 2022-07-09 16:09:28 -07:00
Leonardo de Moura
757171db1f feat: add String.get! and s[i]! notation for String 2022-07-03 14:59:44 -07:00
Leonardo de Moura
e8935d996b chore: String.get?, String.getOp?, and remove String.getOp 2022-07-02 09:59:04 -07:00
Sebastian Ullrich
5a0c3b8d80 fix: String.isNat 2022-06-25 18:42:08 +02:00
Sebastian Ullrich
ae7b895f7a refactor: unname some unused variables 2022-06-07 16:37:45 -07:00
Leonardo de Moura
87bb299f08 feat: add Iterator.atEnd 2022-03-20 11:40:46 -07:00
Leonardo de Moura
3862e7867b refactor: make String.Pos opaque
TODO: this refactoring exposed bugs in `FuzzyMatching` and `Lake`

closes #410
2022-03-20 10:47:13 -07:00
Leonardo de Moura
9727387129 feat: helper theorem for proving termination of simple String traversal functions 2022-03-19 07:37:59 -07:00
Leonardo de Moura
64bd82dddd feat: custom SizeOf instance for String.Iterator 2022-03-19 07:21:17 -07:00
Leonardo de Moura
40f608bfbd chore: cleanup String.extract reference implementation 2022-03-14 16:23:13 -07:00
Leonardo de Moura
bac91b9b5b chore: remove arbitrary 2022-01-15 12:14:27 -08:00
Gabriel Ebner
45bcef5dab refactor: server: use String.firstDiffPos to find changes
This is necessary so that we do not reprocess the whole file if
incremental sync is disabled.
2021-12-14 11:55:34 -08:00
Sebastian Ullrich
978e94272c feat: String.replace 2021-11-18 09:42:35 +01:00
Wojciech Nawrocki
bc8027cdc6 perf: speed up String.intercalate 2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
caa8f7f7b2 chore: expose Substring.prev/next 2021-07-19 09:55:37 +02:00
Wojciech Nawrocki
b2d712a766 fix: Substring.splitOn 2021-07-19 09:55:37 +02:00
Daniel Fabian
93a3fd14ad refactor: do not use explicit instance, but use deriving instead. 2021-07-13 09:58:27 -07:00
Daniel Fabian
0d41fd03f7 feat: add xml parser.
in order to generate the LLVM extern declarations we want to use a generator that spits out XML. Hence adding a small XML parser.
2021-07-13 09:58:27 -07:00
Leonardo de Moura
f4a7ffd8c8 chore: fix codebase and tests 2021-06-29 17:14:52 -07:00
Leonardo de Moura
e8a958d8f3 chore: parameter naming convention 2021-06-06 17:09:26 -07:00
Sebastian Ullrich
4354534fda feat: make FilePath a concrete type
Resolves #363
2021-05-28 14:19:59 +02:00
Leonardo de Moura
3a80e87793 chore: #405 step 1 2021-04-22 20:03:48 -07:00
Leonardo de Moura
e8401ea6e7 chore: remove old instances 2021-01-20 18:12:35 -08:00
Sebastian Ullrich
79107a2316 feat: copy & store whole ref range in SourceInfo 2021-01-20 16:48:50 +01:00
Sebastian Ullrich
8ad061e328 feat: leanpkg: change print-path to print-paths that also emit LEAN_SRC_PATH (unused as of yet) 2021-01-19 19:06:01 +01:00
Sebastian Ullrich
d7733ba662 feat: use leanpkg print-path for worker initialization 2021-01-19 19:06:01 +01:00
Wojciech Nawrocki
af04c66e22 chore: comment style in Init.String.Basic 2021-01-15 13:29:22 -08:00
Wojciech Nawrocki
f3ab908888 fix: substring APIs 2021-01-15 13:29:22 -08:00
Sebastian Ullrich
1f563695bb feat: From/ToJson derive handlers 2020-12-26 19:38:24 +01:00
Leonardo de Moura
76fb1799fe chore: goodies for deriving command 2020-12-11 18:08:50 -08:00
Leonardo de Moura
0869f38de4 chore: update structure, class, inductive 2020-11-27 15:09:30 -08:00
Leonardo de Moura
d6f778bec4 refactor: arbitrary without explicit arguments
@Kha I was tired of writing `arbitrary _` :)
There 0 places in the stdlib where the type needs to be provided.
If in the future we need to specify the type we can use
`arbitrary (α := <type>)`
2020-11-25 09:07:38 -08:00
Sebastian Ullrich
cf9a2ae6af feat: formatter: preserve comments 2020-11-25 11:30:24 +01:00