Commit Graph

202 Commits

Author SHA1 Message Date
Edwin Brady
5a81884d2b
Merge branch 'master' into system.clock 2020-05-09 12:57:10 +01:00
Edwin Brady
600412f9f3
Merge pull request #354 from rgrover/system.random
Add System.Random
2020-05-09 12:54:23 +01:00
Edwin Brady
2cfcea0484
Merge pull request #339 from ziman/traversable-map
Make SortedMap foldable and traversable
2020-05-09 12:50:20 +01:00
Edwin Brady
73223270f4
Merge pull request #337 from ziman/traversable-vect
Export the implementation of `Traversable (Vect k)`
2020-05-09 12:45:41 +01:00
Rohit Grover
fa94713a2a minor reorganization and cleanup of Clock.idr 2020-05-09 18:07:20 +12:00
Rohit Grover
5ceee18a36 fix comment describing the UTC clock type 2020-05-09 18:00:35 +12:00
Rohit Grover
edb063eb50 Add System.Clock to fetch current time for various clock types. 2020-05-09 17:21:23 +12:00
Rohit Grover
a190408aa1 add srand to allow setting the random seed 2020-05-07 21:41:04 +12:00
Rohit Grover
834ae95256 introduce utilities rndFin and rndSelect 2020-05-07 18:01:35 +12:00
Rohit Grover
dcd19a5966 rewrite let statements according to style conventions 2020-05-07 10:46:39 +12:00
Rohit Grover
2fc589aa76 remove a couple of trailing wheres 2020-05-07 10:08:55 +12:00
Rohit Grover
c8e4210289 relocating System/Random.idr under libs/contrib 2020-05-07 10:06:13 +12:00
Rohit Grover
7cfb3419cb Add System.Random 2020-05-06 11:26:58 +12:00
Edwin Brady
30b609d55f readFile needs a newline
This isn't strictly right yet (there should be no newline on the last
lie if there was no newline in the input file) but it puts the behaviour
back to what it was before fGetLine was changed to discard it.

This needs revisiting...
2020-05-04 21:05:51 +01:00
Matus Tejiscak
b34d275705 Make SortedMap traversable. 2020-04-29 09:10:32 +02:00
Matus Tejiscak
633f51c2f4 Make Traversable (Vect k) public export. 2020-04-29 08:59:00 +02:00
Matus Tejiscak
b53489324e Unify names. 2020-04-29 08:54:37 +02:00
Matus Tejiscak
e0e1cb9a21 Use idiom brackets in Traversable (Vect k). 2020-04-29 08:53:30 +02:00
Matus Tejiscak
cab5497ce2 Export the implementation of Traversable (Vect k). 2020-04-29 08:51:38 +02:00
Edwin Brady
085f6806da
Merge pull request #322 from rbarreiro/copy_json_from_idris_dev
added json
2020-04-27 15:29:44 +01:00
Edwin Brady
d0a9f9e9a6 Move takeBefore/takeUntil to Data.Stream
They're not total, so shouldn't be exported from the Prelude - they are
kept there for range syntax though.
2020-04-27 15:25:25 +01:00
Edwin Brady
61fae5c040
Merge pull request #310 from Kaiepi/bsd-builds
Fix builds on *BSD
2020-04-27 15:21:37 +01:00
Edwin Brady
cbd88c9f2e
Merge pull request #316 from abdelq/master
Adding corresponding toFileError for FileExists
2020-04-27 15:17:34 +01:00
Edwin Brady
c95c4c6c0c
Merge branch 'master' into prelude-inline-doc 2020-04-27 13:38:29 +01:00
Edwin Brady
ff86f6f834 Implement occurs check properly (finally!)
Instead of the previous unreliable hack, actually look for occurrences
of the solved metavariable. Block if there are any, and fail if there
are any under a constructor. I had expected this to hurt performance
quite a bit, but it seems it doesn't.
This was prompted by #304, which is now partly fixed, but there's still
a refinement to unification needed to fix it fully (and at least it
doesn't segfault due to the cycle now!)
2020-04-27 12:17:45 +01:00
Rui Barreiro
bb6aaad373 added json 2020-04-25 19:45:29 +01:00
Abdelhakim Qbaich
55bc68a10e Add missing FileExists in toFileError 2020-04-23 23:16:14 -04:00
Edwin Brady
3d8d07621d Some inlining changes
Flags can now be set on implementations too, where the flags get passed
to each of the methods in the implementation. We might want something a
bit more fine grained than this later. Also some small changes to the
way inlining lets is done in the compiler.
2020-04-23 20:01:20 +01:00
Ben Davies
93871c5fb9 Fix builds on *BSD
This makes it so gmake gets used instead of make on *BSD, refactors how
platforms are handled in general.
2020-04-22 11:09:05 -03:00
Kamil Shakirov
5b58bf2cc1 Add missing export 2020-04-22 11:21:12 +06:00
Kamiλ Shakirov
0c7b553e23
Oops 2020-04-22 08:48:38 +06:00
Kamil Shakirov
35994b81e9 Port prelude's inline API documentation from Idris 1 2020-04-22 01:40:40 +06:00
Edwin Brady
5ea11cf0f5
Merge pull request #282 from abailly/network-binary
provide building blocks for binary network I/O
2020-04-21 10:45:52 +01:00
Edwin Brady
1734841275 Add a lambda lifter
It's not actually used as part of any compilation pipeline yet, and I've
only tested it by eyeballing the output, but it'll be useful soon, and
it's good for it to be available to any new back ends that might need
it. It will need some optimisation.
2020-04-19 22:57:10 +01:00
Arnaud Bailly
2b0cc2a592 provide building blocks for binary network I/O 2020-04-14 21:15:32 +02:00
Edwin Brady
69a7640a6e Allow flagging types as externally defined
e.g. in a C file. This means we don't accidentally treat things as
empty, since previously we just defined these as empty types, but that
broke coverage checking. Fixes #240
2020-04-10 11:45:52 +01:00
Edwin Brady
211fc359ca Erase %World for the purpose of newtypes
We never inspect it, so it carries no information - it just needs to be
there as a token to make sure that IO operations run at the right time.
So, IORes can be a newtype now and therefore optimised away.
2020-04-09 00:20:37 +01:00
Guillaume Allais
c5903c45e1 [ cosmetic ] various whitespace issues 2020-04-02 17:31:15 +01:00
Edwin Brady
7c0581a10a
Merge pull request #245 from ziman/stable-sort
Make `List.sortBy` stable
2020-03-31 18:15:27 +01:00
Edwin Brady
04c63b593f
Merge pull request #243 from deviant-forks/intercalate-list
Add `intercalate` for `Data.List`
2020-03-31 18:14:29 +01:00
Edwin Brady
7ff1e6275f Allow setting logging mid term
Sometimes this makes debugging easier since the logging is more
localised.
2020-03-30 22:55:08 +01:00
Edwin Brady
b0e55b53eb A bit more library support 2020-03-30 13:06:59 +01:00
Matus Tejiscak
fcdfa8e191 Fix comment. 2020-03-29 19:50:43 +02:00
Matus Tejiscak
9154a9b02b Add comments. 2020-03-29 19:48:00 +02:00
Matus Tejiscak
2b264d0517 Make sortBy stable. 2020-03-29 19:38:54 +02:00
Marshall Bowers
5b1e8bf436 Add intercalate for Data.List 2020-03-28 13:18:51 -04:00
Matus Tejiscak
d819bf5a9d Fix SeqEmpty in Text.Lexer.Core. 2020-03-28 15:02:08 +01:00
Edwin Brady
d666ed50c9 A couple of library functions 2020-03-19 22:14:48 +00:00
Edwin Brady
dd7ed89ed0
Merge pull request #222 from ziman/sorted-map-set
Adapt Data.Sorted{Map,Set} from Idris 1
2020-03-18 20:35:33 +00:00
Edwin Brady
6f933ba230
Merge pull request #221 from ziman/parser-lazy
Make the applicative combinators in `Text.Parser.Core` lazier
2020-03-18 20:35:01 +00:00