Commit Graph

20 Commits

Author SHA1 Message Date
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
Edwin Brady
d801d0d9ae Start on specialisation
This identifies calls that need specialising and builds a type, but
there's still work to do to build the specialised function.
2020-04-06 22:27:31 +01:00
Guillaume Allais
c5903c45e1 [ cosmetic ] various whitespace issues 2020-04-02 17:31:15 +01:00
Edwin Brady
616495d6c7 Add Idris.Version to ipkg 2020-03-31 23:39:00 +01:00
Marc Petit-Huguenin
7ea39af60e
Literate programming
- Add support for .lidr files.
- Add new Parse Error for Literate fails.
- Add support for Case Split.
- Add support for Add Clause.
- Add support for Add Lemma.
- Add tests.
2020-03-29 11:58:00 -07:00
Edwin Brady
2c2acdcfac Reorganise build system to go via generating C
This has two main advantages: firstly, it actually makes the build slightly
faster and less memory intensive, because Idris doesn't fork a new
process and eat all the memory! Secondly, it means we can build a
distribution with the C file, for building on machines which don't have
Idris 1 available.

Also includes a script for building such a distribution.

I expect someone who is better a writing Makefiles than me can tidy this
up. There are almost certainly problems on Windows too - please help if
you can!

There are new Make targets 'all-fromc' and 'install-fromc' which don't
require building from Idris source, so that we can build with no Idris 1
available.

A small consequence: make install-exec no longer builds the idris2
executable, just installs it.
2020-03-05 17:16:20 +00:00
Edwin Brady
57a14ff401 Coverage checker looks at 'impossible' clauses
These can give valuable information, but since they're not well typed,
we have to rebuild as close an approximation as we can before passing it
to the case tree compiler. We can do this in a type-directed way, but
ignoring whether any of the arguments are convertible, and not trying to
solve any of the implicits. If this fails, it doesn't use the impossible
case, otherwise it uses it to find the missing cases in the resulting
case tree.
2020-02-23 21:40:23 +00:00
Edwin Brady
07509f6103 Begin elaboration of quoting terms 2019-11-30 15:26:17 +00:00
Edwin Brady
1c006b647a Reflect/reify for TTImp
This is further progress towards a metaprogramming system in a form
similar to Elaborator Reflection or Template Haskell, but trying to
avoid leaking too many implementation details of the elaborator itself.
2019-11-24 21:17:16 +00:00
Edwin Brady
1a4f424259 Support UTF8 strings
When writing to ttc, need to take the length in bytes rather than the
length in characters. Also need to write to scheme in the appropriate
format for each scheme system.

While we're at it, Idris 1 supports unicode identifiers (although we
don't encourage it :)) so this allows any characeter >127 in an
identifier.
2019-09-28 14:08:23 +01:00
Edwin Brady
a38cce4c90 Record erasable args in definitions
This could allow us to actually erase (rather than compile with nil)
although experiments show that has no impact on performance. It is
useful to see, though, and other back ends may benefit.
2019-09-19 09:56:19 +01:00
Edwin Brady
8975eeafb7 Make a start on reflection 2019-08-27 15:49:21 +01:00
Edwin Brady
47ad8ee7f5 Propagate implicits to with clauses
Fixes #57. Also move much of the 'with' machinery to its own source
file.
2019-07-30 12:32:33 +01:00
Alex Gryzlov
4d3b42747c add --clean option for ipkg 2019-07-15 14:36:54 +03:00
Niklas Larsson
28438650d0 windows support 2019-07-10 01:51:41 +02:00
Edwin Brady
ae777b8dcb Add parameters blocks 2019-06-29 23:55:17 +01:00
Edwin Brady
40ea548a65 Cache whether a local is let bound, if we can
Since lookup up a binding can be expensive in a big environment, and we
only need to reduce it if it turns out to be a let, caching it can be a
noticeable win
2019-06-23 23:12:27 +01:00
Edwin Brady
2c1c86639a Update makefiles and paths
We can now build and install the prelude, and hello world has
successfully compiled to chez
2019-06-13 16:53:16 +01:00
Edwin Brady
07229bdb5e Add first Idris2 tests 2019-06-11 11:54:47 +01:00
Edwin Brady
146c301f6c Change main program to be Idris2
With the --yaffle flag, you get the old behaviour which is to invoke the
checker for the core theory (and all the tests are updated appropriately
for this).
2019-06-09 11:58:29 +01:00