-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature requests and proposals #13
Comments
Support intrusive unit test framework like Rust, who can run tests on private functions. Instead of providing a first-class test framework integrated into the language, we can make use of the Elab Reflection for the test framework to extract all test functions in the source. That requires the Elab Reflection to have the ability to search through modules including the private items and to provide a custom notation mechanism on items. For example: private
foo : Int -> Int
foo n = n + 1
%test
testFoo : IO ()
testFoo = assert $ foo 1 == 2 With this mechanism, we can also support the benchmark framework. Ps: Doc-test is also good to have. |
You can already write these kind of unit tests by forming the type We do an (advanced) version of that in tparsec by running our parser examples |
@gallais Interesting idea! But I think it's insufficient, because, for example, the Path I added into the compiler made use of System.Info.os, and that could not be decided in compile-time; on the performance aspect, it's too much to run all tests in every compilation when we have large test cases. |
Lots were missing, and some were export, which should probably be public export because the nature of Vect is that it could commonly be used in types. Fixes idris-lang#13
Would it make sense for there be a
My motivation is to be able to write predicates for
Currently, as far as I know, the only way to do this sort of thing on What I'm ultimately hoping for is to be able to write predicates for string validation/parsing, e.g. to validate that a string argument has the shape Edit: In case it's relevant to anyone reading this, it appears |
This is possible in Rust because Lines 261 to 264 in f64163d
|
Also, I'd say Since Lowercase : Char -> Type
Lowercase c = ('a' <= c && c <= 'z') === True or something similar to get that predicate. |
I've found that there're some extensions for different IDEs developed. But I think it'll be better if we have an LSP, so that we can just implement the language detail regardless of the IDE. |
Also, it'll be good if we have a doc for the std library, which makes it more friendly for the mass programmers. |
We (temporarily) have this: https://www.idris-lang.org/pages/idris-2-documentation.html |
We started working on an LSP server implementation here https://github.com/idris-community/idris2-lsp, it is practically on parity with old editing commands, minus semantic highlighting which has been recently merged in the compiler, but we are working on it. |
Do we have FFI with languages other than C (for example, haskell, rust)? I found there's only example of C on the FFI page. |
There are FFIs with at least scheme (chez, racket) and javascript. Anyway, they are managed by each codegen separately AFAIK. You can grep the |
This discussion should probably go somewhere else than the bug tracker. |
Add time complexity & space complexity descriptions in the |
It would be interesting to have type class constrained specialization equivalence (a term I just made up, hopefully not completely un-understandable), e.g. see also / source Functor m <=> GenFunctor Prelude.id m where
map = gmap which would mean that an implementation of either |
Proposal: An Background: Motivation: The existing Other considerations:
|
Have you considered the |
I'll close this as it's a pot pourri of distinct suggestions, some of which have been addressed already. |
Issue by edwinb
Thursday Jul 18, 2019 at 17:58 GMT
Originally opened as edwinb/Idris2-boot#30
If you have a feature request or proposal, or if you're looking for a place to get started contributing to Idris 2, please take a look at https://github.com/idris-lang/Idris2/wiki/Contributions-wanted, or at https://github.com/idris-lang/Idris2/blob/master/CONTRIBUTING.md
At the moment, since it's (mostly) only me working on the project, in about half my time, this is mainly in an effort to prevent the issue tracker for getting out of control, and making sure that I can keep on top of the most important bugs.
Please feel free to discuss proposals via the wiki or the mailing list, however!
The text was updated successfully, but these errors were encountered: