Commit Graph

46 Commits

Author SHA1 Message Date
Robert Wright
c57bb5a65f Add RefC StringIterator support 2021-05-20 14:25:16 +01:00
stefan-hoeck
181b26b250 [ fix ] broken unicode parsing in JSON 2021-04-22 10:59:14 +01:00
Andy Lok
da92f9d676
Cleanup List1 (#1091) 2021-03-17 14:07:52 +00:00
G. Allais
d2eeb7ce86
[ fix #758 ] desugar non-binding sequencing in do blocks to (>>) (#1095) 2021-02-24 11:07:16 +00:00
Guillaume ALLAIS
5b5bdfe769 [ contrib ] Positions in strings
This is an alternative to using `fastUnpack` and `fastPack` to work
on lists of characters.

Using this to refactor the lexer and benchmarking the resulting
compiler on building idris2 shows it's 3 to 5s slower than the
current implementation that goes via `List Char`.

This may be backend-dependent so I still push this to contrib,
with the plan of running further benchmarks in the future.
2021-02-18 17:52:25 +00:00
Ruslan Feizerahmanov
515453329a
Revert back to linear iterators (#938) 2021-01-21 12:37:30 +00:00
Edwin Brady
efae2682bd
Merge pull request #896 from Russoul/toString-iterators
Add withIteratorString
2021-01-16 15:47:45 +00:00
Stiopa Koltsov
b76c9d91e0 Remove trailing whitespaces and add trailing newlines 2021-01-16 10:00:03 +00:00
russoul
79d0cd1ba6 Add withIteratorString 2020-12-31 20:36:07 +03:00
Edwin Brady
b75dcd5c17 Some multiplicity fixes in the libraries 2020-12-29 21:25:00 +00:00
Alex Humphreys
71a638ef28 Add extra parsers
This also changes the return type of `char` and `string`. They
previously returned `()`, they now return `Char` and `String`
repectively.

Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
2020-11-27 11:54:12 +00:00
Alex Gryzlov
f79b86ae41
contrib.Data.String.Parser updates (#713) 2020-10-24 12:33:15 +01:00
Matus Tejiscak
f64163de1f Merge branch 'unscheme' into master 2020-10-11 08:20:01 +02:00
G. Allais
3df1f9c476
[ fix #63 ] interleaving let binders and local declarations (#691) 2020-09-28 13:15:22 +01:00
Christian Rasmussen
9add729ca3 Add Data.String.Iterator implementation for JavaScript 2020-09-20 17:44:19 +02:00
Matus Tejiscak
0a203f8f52 Add a warning comment. 2020-09-20 17:42:50 +02:00
Matus Tejiscak
b58cc433c8 Index StringIterator with the String it refers to. 2020-09-20 10:36:04 +02:00
Matus Tejiscak
d26a9c55bf Tune Data.String.Iterator. 2020-09-20 10:02:18 +02:00
Matus Tejiscak
f73fa55075 Unpack strings into a lazy list. 2020-09-19 22:48:45 +02:00
Matus Tejiscak
e36c211cc0 Add a missing covering annotation. 2020-09-19 21:57:54 +02:00
Matus Tejiscak
74f592053e Make StringIterator abstract. 2020-09-19 21:54:34 +02:00
Matus Tejiscak
7b2d1190a1 Make the comments more explicit. 2020-09-19 15:22:29 +02:00
Matus Tejiscak
5360adcc23 String-related stdlib tweaks. 2020-09-19 14:22:54 +02:00
Alex Gryzlov
969f5443a9 additional refactor of Data.String.Parser 2020-08-27 15:27:52 +01:00
Alex Gryzlov
ef5299733a
refactor Data.String.Parser (#579) 2020-08-22 08:13:34 +01:00
Alex Humphreys
f47d9cfef2 Add integer paser and extra test
Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
2020-08-10 13:26:20 +02:00
Alex Humphreys
f020fd29e8 Use overloaded Fin literals
Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
2020-08-10 13:26:20 +02:00
Alex Humphreys
d4cbb8a620 Move natural and digit combinators
Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
2020-08-07 19:20:32 +02:00
Alex Humphreys
40427bd527 Move combinators to Data.String.Parser 2020-08-06 13:16:47 +02:00
Alex Humphreys
97b41d1ad9 Rename BuildExpressionParser to Parser.Expression
Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
2020-08-06 12:42:38 +02:00
Alex Humphreys
22915d23ca Remove LO function
Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
2020-08-06 12:27:42 +02:00
Alex Humphreys
eca083cdcc Add License comment to BuildExpressionParser
Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
2020-08-06 08:59:57 +02:00
Alex Humphreys
29e49a74c5 Add BuildExpressionParser to contrib
Signed-off-by: Alex Humphreys <alex.humphreys@here.com>
2020-08-06 08:59:57 +02:00
Niklas Larsson
52c6db09d1 Add <?> for replacing error messages 2020-07-06 14:13:56 +02:00
Niklas Larsson
60a067fab1 Remove dumpState 2020-07-06 13:57:13 +02:00
Niklas Larsson
5060eaafaf Make things public export to work with bootstrap 2020-07-05 21:51:12 +02:00
Niklas Larsson
af83c9303b Add test and documentation 2020-07-05 21:51:12 +02:00
Niklas Larsson
d779c85df4 Add optional 2020-07-05 21:51:11 +02:00
Niklas Larsson
0e51124a43 Add option 2020-07-05 21:51:11 +02:00
Niklas Larsson
bba15974a5 Add takeWhile
add substring and length primitives to Data.Strings
2020-07-05 21:51:11 +02:00
Niklas Larsson
39535bf11a Add lifting 2020-07-05 21:51:11 +02:00
Niklas Larsson
d97789190d Add bounds checking 2020-07-05 21:51:11 +02:00
Niklas Larsson
f290c6c3ce Start on a simple string parser 2020-07-05 21:51:11 +02:00
Ohad Kammar
ac1fa28890 Add a simple DYI f-string / string interpolation library
Apparently the concrete syntax is controversial ("{apples}"
vs. "$oranges"), so I'm just adding a simple DYI version until we
agree on a concrete syntax
2020-06-26 16:52:37 +01:00
Edwin Brady
c88bf7af8d Fix import loading
This was taking too long, and adding too many things, because it was
going too deep in the name of having everything accessible at the REPL
and for the compiler. So, it's done a bit differently now, only chasing
everything on a "full" load (i.e., final load at the REPL)

This has some effects:
+ As systems get bigger, load time gets better (on my machine, checking
  Idris.Main now takes 52s from scratch, down from 76s)
+ You might find import errors that you didn't previously get, because
  things were being imported that shouldn't have been. The new way is
  correct!

An unfortunate effect is that sometimes you end up getting "undefined
name" errors even if you didn't explicitly use the name, because
sometimes a module uses a name from another module in a type, which then
gets exported, and eventually needs to be reduced. This mostly happens
because there is a compile time check that should be done which I
haven't implemented yet. That is, public export definitions should only
be allowed to use names that are also public export. I'll get to this
soon.
2020-05-27 15:49:03 +01:00
Edwin Brady
dec7dff622 Add libraries 2020-05-18 14:00:08 +01:00