Commit Graph

1284 Commits

Author SHA1 Message Date
Thomas Herzog
0fb1192cd3 add stub functions for primitive casts between BitsN types
Related to https://github.com/idris-lang/Idris2/pull/548.

The PR linked above adds `Cast` implementations for `BitsN` types. These
implementations use primitive functions which are not available in
Iris2-boot. This commit adds these functions as a stub to make the Prelude
in Idris2 compile again.
2020-08-11 14:32:46 +01:00
Guillaume ALLAIS
cd0d7d692b [ base ] add total last to List1 2020-08-05 12:09:35 +01:00
Guillaume ALLAIS
2425e76a1e [ base ] add cons for List1
Ignoring quantities:

(::) : a -> List a -> List1 a

but

cons : a -> List1 a -> List1 a
2020-08-05 11:47:03 +01:00
Guillaume ALLAIS
2b5a00224d [ update ] introducing Data.List1 to match idris2
Lost of whitespace errors automatically removed too...
2020-08-04 13:27:40 +01:00
Niklas Larsson
8fc166acd4 Add find function to Data.List 2020-06-11 11:33:07 +01:00
Niklas Larsson
e9611b4ee1 Allow newer idris than 1.3.2 2020-06-07 13:25:24 +01:00
Edwin Brady
75bb7883f6
Merge pull request #391 from melted/fix_boot
Add isWindows
2020-06-01 22:19:08 +01:00
Niklas Larsson
d17bf01a5c Add isWindows 2020-06-01 22:25:24 +02:00
Edwin Brady
3cfd35c437 Move System.Clock to base
Again, for consistency with Idris 2 proper to allow it to build from
this repo more easily
2020-05-24 20:32:04 +01:00
Edwin Brady
a5c9ce9306 Some directory file function renamings
This allows us to build Idris2 proper again
2020-05-24 20:29:49 +01:00
Edwin Brady
e2ef9e05eb
Merge pull request #390 from ska80/fix-idris2sh-build
Fix building the latest self-hosted Idris 2
2020-05-22 11:07:12 +01:00
Kamil Shakirov
8a61f97ff6 Update .gitignore 2020-05-22 11:33:23 +06:00
Kamil Shakirov
27006bc516 Fix building the latest self-hosted Idris 2
* Add System.Path to the 'contrib' package
* Update Data.List in the 'base' package
2020-05-22 02:02:51 +06:00
Edwin Brady
fa92951af0 Update travis script 2020-05-20 13:59:55 +01:00
Edwin Brady
24fed4feea Rename everything idris2boot, increment version
From here on, this repo is intended only as a bootstrapping step for the
self hosted Idris 2. It will - as long as possible - be kept up to date
enough that it can build Idris 2, but won't be maintained beyond that.
2020-05-20 13:23:00 +01:00
Edwin Brady
d2c84224c9
Merge pull request #389 from andylokandy/gambit
Build standalone executable via gambit backend
2020-05-19 22:38:13 +01:00
andylokandy
2fa61b8e33 Fix gambit codegen 2020-05-20 04:17:07 +08:00
Edwin Brady
e611161ec4 Update CONTRIBUTORS 2020-05-19 20:09:59 +01:00
Edwin Brady
149e6fbbaa Add blodwen-os to racket support 2020-05-19 19:38:37 +01:00
Edwin Brady
c0b7c6a9d8
Merge pull request #367 from cypheon/bugfix/ttc-bigint-unmarshalling
Fix unmarshalling of Integer values in TTC (Fixes: #345)
2020-05-19 19:38:15 +01:00
Edwin Brady
c197c0f777 Update Buffer+File libraries
Adding primitives - it's useful to distinguish between 32 bit and 64 bit
integers when writing to buffers.
2020-05-19 16:06:05 +01:00
Edwin Brady
ba9f14a18c Don't collapse empty lines in 'lines' 2020-05-19 10:44:16 +01:00
Edwin Brady
8c9eec15a8 Calculate OS from scheme code
This way if you distribute scheme it won't have an OS hard coded based
on the machine it was generated on
2020-05-18 19:03:41 +01:00
Edwin Brady
0ef2885548 Use realpath in chez startup script
This gives the right location for finding libraries on the Mac, where
dirname has slightly different behaviour.
It does now require 'realpath' to be installed, which on the Mac is part
of 'coreutils' which can be installed via 'brew'
2020-05-18 18:12:56 +01:00
Edwin Brady
ea84eab2e6 Faster search for modules to build in packages
There was a lot of repeated work in packages, since it tried to build
the module tree starting from every listed module. Now, it skips the
ones where they're already in the tree.
2020-05-18 10:15:31 +01:00
Edwin Brady
c7ef44996a Fix codegen in Chez/Racket
Paths in the chez startup script need to be relative to allow it to be
relocatable; racket needs some libraries for buffers.
2020-05-18 09:43:16 +01:00
Edwin Brady
a130952928 Switch buffers back to scheme FFI
It's just easier to deal with the memory management! But we should do
something more flexible here later.
2020-05-17 22:49:41 +01:00
Edwin Brady
463f1b3233 Add foldlM
Needed for self hosting, and probably ought to be in the prelude by the
usual rule of thumb
2020-05-17 15:23:05 +01:00
Edwin Brady
1acbf1b67e Add Show for Either 2020-05-17 14:51:27 +01:00
Edwin Brady
a302be38f4 Add missing export modifier to ExitCode 2020-05-17 13:08:30 +01:00
Edwin Brady
3d56ec62b4 Update ipkgs
Algebra modules were missing
2020-05-16 19:05:26 +01:00
Edwin Brady
f0a87e88c2 Remove extra Show TokenData definition 2020-05-16 19:03:30 +01:00
Edwin Brady
c7f893f6aa Reorganise optimisation options for C
It should be -O2 for the rts, but -O2 takes ages for idris2.c so should
be saved for releases (also OPT should be able to be edited easily for
e.g. adding profiling)
Also default to clang (perhaps it would be better if we could check
whether clang was available first, but it does a better job as the
default overall).
2020-05-16 18:08:00 +01:00
Edwin Brady
6ef86bc5d6 Fix check in findOffset 2020-05-16 18:05:45 +01:00
Edwin Brady
7259743f99 Update docs; options now in config.mk 2020-05-16 17:35:55 +01:00
Edwin Brady
4c35210025
Merge pull request #370 from ska80/fix-makefiles
Refactor makefiles
2020-05-16 17:34:51 +01:00
Edwin Brady
79d52c5207 Switch to List Char for the lexer
Surprisingly, this doesn't affect performance - it shows up as about the
same in the profile. But more importantly, it ports more directly to
Idris 2, which can't guarantee that 'strTail' doesn't allocate at
runtime, so using a List Char here is much more efficient.

This probably points to the need for better string primitives. Later...
2020-05-16 16:30:51 +01:00
Edwin Brady
560449e087 Check bounds on substring
Fixes #379
2020-05-16 13:50:37 +01:00
Edwin Brady
19bcefb25e contrib shouldn't be in the default search path
Sorry, I should look more carefully... contrib is a space for incoming
experimental libraries that might get sorted into something better, so
it shouldn't be a place for things that are in the default library path
(this is consistent with Idris 1 behaviour)
2020-05-16 13:08:07 +01:00
Edwin Brady
debe5f6fc3 Add chmod to System.File
Idris 2 needs it - Windows probably needs something else (patches for
Windows support will be very much welcomed!)
2020-05-16 13:02:48 +01:00
Edwin Brady
263d5fa3a1 More system functions
exit, and getting the whole environment
2020-05-16 13:02:48 +01:00
Edwin Brady
34802b9304 Add some Strings functions
strM for nicer matching on head and tail, and functions for parsing
numbers
2020-05-16 13:02:48 +01:00
G. Allais
306aea32b8
[ test ] add test for defaulting peculiarity (#376) 2020-05-16 00:43:17 +01:00
Edwin Brady
6f4a36e84b Add octal literals 2020-05-15 22:31:02 +01:00
Edwin Brady
a3790d8442 Remove a couple of libraries Racket doesn't need
These affect startup time, and are no longer needed now they're done in
libidris2_support
2020-05-15 15:55:50 +01:00
Edwin Brady
3a9823e32a Add --verbose flag
Sometimes it's nice to see what's building even if other flags like -o
override it
2020-05-15 15:55:50 +01:00
Edwin Brady
7edef68739
Merge pull request #374 from ska80/fix-chez017-test
Fix tests/chez/chez017 test
2020-05-15 15:55:35 +01:00
Johann Rudloff
17b01b807e Fix unmarshalling of Integer values in TTC
Switch (un)marshalling of Integer values to Bits8 instead of Int.

Previously, in `fromLimbs`, the read values arrived as a list of
(32-bit) Ints. If any of the limbs had its MSB set, it would be
interpreted as a negative number and corrupt the result.

This commit fixes this by using a `List Bits8` instead, which has an
explicit (and direct) mapping to Bytes in the Buffer, where it's
eventually stored. This way no awkard casts need to happen.
2020-05-15 15:48:57 +02:00
Johann Rudloff
735395f403 Fix expected values of arithmetic test
These are the correct results, verified by performing the calculations
"manually" in both Python 3 and Chez Scheme.
2020-05-15 15:48:57 +02:00
Edwin Brady
21507e64f3 Some Racket CG fixes
libc needs a version number, and we need to make sure we're not
generating FFI definitions more than once
2020-05-15 12:43:31 +01:00