Commit Graph

12 Commits

Author SHA1 Message Date
Michael Messer
a1f3424ab8 Remove lamdaRequire 2021-01-05 16:30:11 +00:00
Niklas Larsson
8a210d536e
Merge pull request #408 from melted/buffer_api
Add concatBuffers and splitBuffer to Data.Buffer
2020-07-21 10:43:17 +02:00
Rui Barreiro
88f8e745b1 Merge branch 'master' of github.com:idris-lang/Idris2 into javascript 2020-07-05 12:19:45 +01:00
Niklas Larsson
862bbeb308 Reverse the size check
I'm unsure how it would handle zero-size buffers if size==pos and no one
would need those anyway.
2020-07-04 11:37:51 +02:00
Niklas Larsson
ce3096f919 Add concatBuffers and splitBuffer to Data.Buffer
Expand the buffer test.
2020-07-04 02:25:41 +02:00
Niklas Larsson
6673f49731 Convert Data.Buffer to HasIO 2020-07-01 23:33:30 +02:00
Rui Barreiro
cb7dc7bffc test node004 passes 2020-06-17 23:29:54 +01:00
Edwin Brady
0a246af449 Make Buffer more primitive
Meaning that the FFI is aware of it, so you can send arbitrary byte data
to foreign calls. Fixes #209

This means that we no longer need the hacky way of reading and writing
binary data via scheme, so can have a more general interface for reading
and writing buffer data in files.

It will also enable more interesting high level interfaces to binary
data, with C calls being used where necessary.

Note that the Buffer primitive are unsafe! They always have been, of
course... so perhaps (later) they should have 'unsafe' as part of their
name and better high level safe interfaces on top.

This requires updating the scheme to support Buffer as an FFI primitive,
but shouldn't affect Idris2-boot which loads buffers its own way.
2020-06-11 14:05:52 +01:00
Edwin Brady
2eb2ce6097 Add Bits primitives
Including appropriate casts, and Num/Eq/Ord/Show implementations.
Also includes new primitives in Data.Buffer, and calls to foreign
functions in C as 'unsigned'.
2020-06-01 11:48:03 +01:00
Edwin Brady
cff5fc2625 Workaround for byte vectors in Racket
Racket appears to have a different notion of current directory than the
system does, so we need to tell it which directory we think we're in
when reading and writing bytevectors using the scheme file functions.
2020-05-23 21:37:31 +01:00
Edwin Brady
2569b6e991 Update libraries from upstream 2020-05-19 17:03:18 +01:00
Edwin Brady
dec7dff622 Add libraries 2020-05-18 14:00:08 +01:00