Commit Graph

32 Commits

Author SHA1 Message Date
Stiopa Koltsov
2eb8f4149c idris2 --help now prints env variables used by the compiler
Until yesterday I did not know Idris2 accesses environment variables.
Mentioning them in `--help` would educate other users.

Not all descriptions make sense, I tried my best to guess them.

Output is: [link](https://gist.github.com/stepancheg/7d1dff344a0dd35b9d07fb4a417ecb32).
2021-01-18 10:40:47 +00:00
Guillaume ALLAIS
5de647cc3f [ refactor ] use difference list for efficient append 2020-12-08 13:07:53 +00: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
Ruslan Feizerahmanov
1d99a28176
Add Bifunctor interface (#701) 2020-09-30 10:51:07 +01:00
G. Allais
3df1f9c476
[ fix #63 ] interleaving let binders and local declarations (#691) 2020-09-28 13:15:22 +01:00
Guillaume ALLAIS
364ff73a1f [ refactor ] split up Core.Context
`Core.Context` is 2k+ LoC and contains a *lot* of different thins.
Rather than moving the `log` functions above of `addData` to be able
to add logging there, fork them off to independent files to make the
whole thing more readable.
2020-09-16 15:45:16 +01:00
G. Allais
937aa8fc43
[ refactor ] introducing Namespace (#638)
Until now namespaces were stored as (reversed) lists of strings.
It led to:

* confusing code where we work on the underlying representation of
  namespaces rather than say what we mean (using `isSuffixOf` to mean
  `isParentOf`)

* potentially introducing errors by not respecting the invariant cf.
  bug report #616 (but also name generation in the scheme backend
  although that did not lead to bugs as it was self-consistent AFAICT)

* ad-hoc code to circumvent overlapping interface implementation when
  showing / pretty-printing namespaces

This PR introduces a `Namespace` newtype containing a list of strings.
Nested namespaces are still stored in reverse order but the exposed
interface aims to support programming by saying what we mean
(`isParentOf`, `isApproximationOf`, `X <.> Y` computes to `X.Y`, etc.)
irrespective of the underlying representation.
2020-09-05 09:41:31 +01:00
Guillaume ALLAIS
529944267b Revert "[ refactor ] Introducing Namespace and ModuleIdent (#631)"
This reverts commit 481dc431e7.
2020-09-04 09:16:06 +01:00
G. Allais
481dc431e7
[ refactor ] Introducing Namespace and ModuleIdent (#631)
Until now namespaces were stored as (reversed) lists of strings.
It led to:

* confusing code where we work on the representation rather than say
  what we mean (e.g. using `isSuffixOf` to mean `isParentOf`)

* potentially introducing errors by not respecting the invariant cf.
  bug report #616 (but also name generation in the scheme backend
  although that did not lead to bugs as it was self-consistent AFAICT)

* ad-hoc code to circumvent overlapping interface implementations when
  showing / pretty-printing namespaces

This introduces a Namespace newtype containing non-empty lists of
strings. Nested namespaces are still stored in reverse order but the
exposed interface aims to support programming by saying what we mean
(`isParentOf`, `isApproximationOf`, `X <.> Y` computes to `X.Y`, etc.)
irrespective of the underlying representation.
2020-09-02 20:05:33 +01:00
G. Allais
da78ac4783
[ new ] topics for logging levels (#569) 2020-08-20 18:45:34 +01:00
Niklas Larsson
24d4ccf007 Add missing Text.Bounded to ipkg 2020-08-19 01:21:32 +02:00
Giuseppe Lomurno
42404c2d9d Automatic console width detection 2020-08-18 19:25:36 +01:00
Giuseppe Lomurno
df4f990b3c PTerm and error intial prettyprinting 2020-08-18 19:25:36 +01:00
Niklas Larsson
a5b101dc3c Update ipkg files 2020-07-10 11:03:21 +02:00
Edwin Brady
ff46a8db14 Initial implementation of :doc
It's not pretty, but at least it exists now
2020-07-08 15:52:57 +01:00
Niklas Larsson
5221954aca Prepare for additional codegens
The idea is to make everything accessible via the API, so
codegen implementors will be able to reuse all infrastructure by calling
the appropriate function in Idris.Driver supplying their codegen.
2020-06-15 16:11:05 +02:00
Edwin Brady
d6e3f1f746
Merge pull request #100 from ska80/use-contrib
Use Control.Delayed from the 'contrib' package
2020-06-08 12:07:09 +01:00
Edwin Brady
3d2765e930 Add top level %runElab
This invokes a script of type Elab (). %runElan in a term invokes a
script of type Elab TT. The elaborator now pushes in that type, so that
it'll report an appropriate error if you give it a script of the wrong
type.
2020-06-01 19:06:10 +01:00
Edwin Brady
e1dbcad2fc Make a start on reflection
Don't get too excited yet - I want this in so that it doesn't get too
out of sync, but I still have to think about exactly how it's going to
work in practice.
2020-05-29 22:40:29 +01:00
Kamil Shakirov
d43850d86e Merge branch 'master' into use-contrib 2020-05-29 15:05:18 +06:00
Niklas Larsson
696db7f58f
Merge pull request #169 from andylokandy/pathcom
Use Path in the compiler
2020-05-27 21:23:29 +02:00
andylokandy
fa902932fc Use Path in compiler 2020-05-26 17:43:27 +08:00
Kamil Shakirov
d5743911fe Sync idris2api.ipkg with idris2.ipkg 2020-05-26 12:24:42 +06:00
Kamil Shakirov
a3d57cd4fc Merge branch 'master' into use-contrib 2020-05-25 13:01:15 +06:00
Fabián Heredia Montiel
731a416043 Split Package Specific Lexer/Rules from Lexer/{Common,Source} and Refactor Idris/Package
Co-authored-by: Matus Tejiscak <ziman@functor.sk>
2020-05-24 16:01:17 -05:00
Kamil Shakirov
6cd6594510 Use Control.Delayed from the 'contrib' package 2020-05-22 01:27:50 +06:00
Fabián Heredia Montiel
af85cbefa7 Extract Common Lexer Utilities 2020-05-21 12:52:26 -05:00
Fabián Heredia Montiel
5265c70c71 Extract Common Lexer Rules 2020-05-21 12:52:26 -05:00
Fabián Heredia Montiel
acaddc1e9d Rename module Parser.Rule to Parser.Rule.Source 2020-05-21 12:52:26 -05:00
Fabián Heredia Montiel
662782503f Rename module Parser.Lexer to Parser.Lexer.Source 2020-05-21 12:52:26 -05:00
Fabián Heredia Montiel
6a5d6647c1 Split Parser.Support 2020-05-20 15:00:42 -05:00
Edwin Brady
0cd484fa09 Add idris2api.ipkg
This is a small variation that installs all the modules as a library,
which could be used by external tools, eg fancy REPLs, code generators,
etcs.
2020-05-20 16:38:46 +01:00