Commit Graph

1563 Commits

Author SHA1 Message Date
Tim Engler
72af040e7e Fixes Issue #74. The problem is that if the function is defined in a sub
module, then the current namespace (accessed by calling getNS) differs
from the function namespace, therefore it is not considered visible by
TTImp.Elab.App.checkVisibleNS
2020-11-11 10:28:51 +00:00
Cotton Hou
52ba8b00a6 Fix broken url to JS code gen page in faq 2020-11-01 11:07:06 +00:00
Giuseppe Lomurno
5d2e740450 Typo in Idris/IDEMode/Commands.idr 2020-11-01 02:12:59 +01:00
Jonas Claesson
9f9abc8025 Gambit: add GAMBIT_GSC_BACKEND env configuration
Gambit after version v4.9.3 supports the -cc option, which configures
the compiler backend Gambit will use to build the binary. Currently to
get this functionality Gambit needs to be built from source, since it is
not yet available in a released version.
2020-10-31 10:19:55 +01:00
Jonas Claesson
e4d892490d Add option to compile to C on Gambit CG
Use the '--codegen gambit --directive C' compilation flags.
2020-10-31 09:14:15 +01:00
Giuseppe Lomurno
b0b8330cd9 New IDEMode syntax option and fixed output 2020-10-31 03:51:19 +01:00
Guillaume ALLAIS
a9ff13c663 [ new ] proof that evaluation is Domain-independent 2020-10-29 23:05:41 +00:00
russoul
c8875c0f9d Do a tiny renaming 2020-10-26 18:54:11 +03:00
DavidTheBugWriter
b4b800e967 Update starting.rst
Hellow world execute fails on Macos as it doesn't have realpath by default & one needs to install it with coreutils first.
2020-10-24 12:35:13 +01:00
Christian Rasmussen
66fe57f340 Run tests chez029 and node022 via code generator 2020-10-24 12:34:04 +01:00
Alex Gryzlov
f79b86ae41
contrib.Data.String.Parser updates (#713) 2020-10-24 12:33:15 +01:00
Niklas Larsson
aa6e36ef43
Merge pull request #749 from ska80/remove-refc-schemecall
[refc] Remove 'schemeCall' as it is not used anymore
2020-10-21 16:53:59 +02:00
Kamil Shakirov
544208ec92 [refc] Update 'sysOS' to recognize more BSD flavors 2020-10-21 17:20:51 +06:00
Kamil Shakirov
0b36a5fe3b [refc] Remove 'schemeCall' as it is not used anymore 2020-10-21 16:57:05 +06:00
Edwin Brady
ccdfc363e3
Merge pull request #739 from edwinb/refcount-c
Experimental C backend with reference counting
2020-10-21 11:12:28 +01:00
Edwin Brady
77ba750abf
Merge pull request #5 from MarcelineVQ/refcount-c
remove some redundancy, make tiny style changes
2020-10-21 10:15:27 +01:00
Edwin Brady
0a705f846c
Merge pull request #4 from melted/refcount-c
Make it build on windows
2020-10-21 10:14:31 +01:00
Jan de Muijnck-Hughes
de58c66ab2
Make Idris2 test harness available for the many and not the few. (#719)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2020-10-19 09:26:23 +01:00
Guillaume ALLAIS
14d0141ca2 [ fix #735 ] Make sure type constructors are fully applied 2020-10-16 14:44:11 +01:00
Guillaume ALLAIS
7192ef28a3 [ test ] add IDRIS2_TESTS_CG env variable 2020-10-16 14:44:11 +01:00
Guillaume ALLAIS
482527063c [ new ] Variant with a runtime irrelevant Domain
Rather than translating the constraints to a Dybjer-Setzer IR code
we can produce an ad-hoc definition of a `Domain` that we will be
able to make runtime irrelevant.

This means that compiled code will never need to construct a proof
that a value is in the domain of the function: it will simply run
the function!
2020-10-15 17:03:32 +01:00
Guillaume ALLAIS
864be2c9dc [ contrib ] add McBride's General monad 2020-10-15 17:03:32 +01:00
Matúš Tejiščák
1483b61091
Merge pull request #741 from ShinKage/ide-flush
Flush stdout in IDE mode first message
2020-10-14 09:12:37 +02:00
Mathew Polzin
1acace5d1e not working, but exploratory. 2020-10-13 21:53:14 -07:00
Giuseppe Lomurno
37c4fd5771 Flush stdout in IDE mode first message 2020-10-14 03:32:54 +02:00
russoul
3ad87e97f1 Adjust to the removal of ad-hoc postfix projections, Bump up ttc version 2020-10-12 17:55:47 +03:00
russoul
fd90141ed9 Merge branch 'master' of https://github.com/idris-lang/Idris2 into master 2020-10-12 17:36:45 +03:00
russoul
3cb30516e3 Adjust to the removal of ad-hoc postfix projections 2020-10-12 16:12:39 +03:00
russoul
e7f81df453 Add NameAt to Ide mode 2020-10-12 15:03:51 +03:00
MarcelineVQ
50faacf69c remove some redundancy, make tiny style changes 2020-10-11 22:18:51 -07:00
Niklas Larsson
604e7ea99e Make it build on windows 2020-10-11 23:36:52 +02:00
Edwin Brady
0972e69287 Update changelog 2020-10-11 18:55:43 +01:00
Edwin Brady
97e5f04c34 Add believe_me and crash primitives to refc 2020-10-11 18:51:45 +01:00
Edwin Brady
3007b5a99d Generate an executable via CC
This builds a .o from the generated C, and statically links with the
libidris2_support library. It doesn't yet dynamically link with any
additional libraries.
2020-10-11 18:35:51 +01:00
Edwin Brady
788bea3906 Update tests to list refc 2020-10-11 15:59:22 +01:00
Edwin Brady
2a39a6461a Merge github.com:idris-lang/Idris2 into refcount-c 2020-10-11 15:12:18 +01:00
Edwin Brady
a76a1322eb Initial merge of reference counting C back end
Written by Volkmar Frinken (@vfrinken). This is intended as a
lightweight (i.e. minimal dependencies) code generator that can be
ported to multiple platforms, especially those with memory constraints.

It shouldn't be expected to be anywhere near as fast as the Scheme back
end, for lots of reasons. The main goal is portability.
2020-10-11 15:05:00 +01:00
Matúš Tejiščák
1a58075a54
Merge pull request #716 from sysvinit/fix-network-constants
Retrieve network address family preprocessor constants from C runtime code
2020-10-11 08:37:44 +02:00
Matúš Tejiščák
1d2437abd5
Merge pull request #717 from zenntenn/patch-1
Suggest adding a Jupyter kernel for Idris
2020-10-11 08:34:19 +02:00
Matus Tejiscak
f64163de1f Merge branch 'unscheme' into master 2020-10-11 08:20:01 +02:00
Matus Tejiscak
668762e693 Merge branch 'revert-projections' into master 2020-10-11 08:12:00 +02:00
Ohad Kammar
ef730c7eb1
preorder reasoning: introduce a Step datatype (#734)
Refactor the DIY equational reasoning library to be a bit more like
the generic pre-order reasoning library:

Change the `...` notation into a constructor for a new `Step` datatype.

This seems to help idris disambiguate between the two kinds of
reasoning when they're used in the same file (e.g., frex).

Co-authored-by: Ohad Kammar <ohad.kammar@ed.ac.uk>
2020-10-07 17:44:18 +01:00
Ohad Kammar
0c1a124704
Division theorem (#695)
Division Theorem. For every natural number `x` and positive natural
number `n`, there is a unique decomposition:
`x = q*n + r`
with `q`,`r` natural and `r` < `n`.

`q` is the quotient when dividing `x` by `n`
`r` is the remainder when dividing `x` by `n`.

This commit adds a proof for this fact, in case
we want to reason about modular arithmetic (for example, when dealing
with binary representations). A future, more systematic, development could
perhaps follow: @clayrat 's (idris1) port of Coq's binary arithmetics:

    https://github.com/sbp/idris-bi/blob/master/src/Data/Bin/DivMod.idr
    https://github.com/sbp/idris-bi/blob/master/src/Data/Biz/DivMod.idr
    https://github.com/sbp/idris-bi/blob/master/src/Data/BizMod2/DivMod.idr

In the process, it bulks up the stdlib with:
+ a generic PreorderReasoning module for arbitrary preorders,
analogous for the equational reasoning module
+ some missing facts about Nat operations.
+ Refactor some Nat order properties using a 'reflect' function

Co-authored-by: Ohad Kammar <ohad.kammar@ed.ac.uk>
Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2020-10-06 13:09:02 +01:00
Rui Barreiro
30a190e0a2 re added replaceNamesExp 2020-10-05 15:11:22 +01:00
Rui Barreiro
44151ecbae Merge branch 'master' of github.com:idris-lang/Idris2 into issue_596 2020-10-05 14:47:17 +01:00
Rui Barreiro
a5b2247f28 mutual tail recursion 2020-10-05 14:39:38 +01:00
russoul
939de39a57 Rename stuff a bit 2020-10-03 19:44:12 +03:00
russoul
0824e93874 Add more defs and comments into the test file 2020-10-03 19:26:21 +03:00
Ruslan Feizerahmanov
2e627ad16e
Remove invalid implicit in PreorderReasoning (#727) 2020-10-03 14:53:14 +01:00
G. Allais
5e85446e9c
[ fix #724 ] Typo in the magic string (#726) 2020-10-03 14:39:13 +01:00