Explaining how to write the most basic Idris bindings for readline,
taking account of how to allocate Strings in the completion callback.
Also adds the basic API as a sample, which can be used as a starting
point for other packages containing C bindings.
For an output file 'f', now generate a subdirectory in the executable
directory 'f_app', and put 'f.so' and 'f.ss' in there, along with any C
libraries we might have needed. Then generate a shell script 'f' to set
the library path to `f_app` and invoke `f.so`.
In :exec mode, f = _tmpchez, so we're using the executable directory for
the temporary files.
This means all the libraries and code needed to run the generated
program are copied to a single relocatable target directory.
This almost certainly won't work on Windows. Please help! Thanks :)
Usually I put this sort of thing in contrib first, but this is a direct
replacement for Control.IOExcept (previously in base in Idris 1) so I'm
putting it straight in this time.
That's most of it now - just missing a section on multiplicities, and a
section on the differences from Idris 1.
Ideally, there should also be a much more gentle introduction (basically
doing the same as the first 3 chapters of TypeDD in Idris). But that's
for some other time...
These are still to be updated (as noted in the files), but it needs
doing before any kind of preliminary release. Plan is to refresh the
tutorial and make sure samples work again, then write a more
comprehensive document explaining changes since Idris 1.
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.