Commit Graph

3490 Commits

Author SHA1 Message Date
André Videla
c6e476ed1a
Merge pull request #2997 from andrevidela/infix-namespace-hiding
Infix namespace hiding
2023-06-14 12:29:25 +01:00
Andre Videla
9797a79b53 [ new ] Allow fixities to be hidden with %hide
* Change the printing of namespaced operator to show
  parenthesis around operators
* Update warning when conflicting fixities are found
* Do not warn about redundant but compatible fixities
2023-06-14 11:19:59 +01:00
André Videla
1fa59f842a
Merge pull request #2926 from Alex1005a/let-in-do
Add explicit error when using let-in in do block
2023-06-13 16:21:13 +01:00
Alexander
63fa070efa add test for parse error let-in in do block 2023-06-13 11:01:42 +03:00
Alexander
a01b7e25d9 [parser] error message if use let-in in do block 2023-06-13 10:35:39 +03:00
André Videla
26c5c4db03
Merge pull request #2970 from WalterSmuts/main
Typos: Run 'typos -w' command over docs/
2023-06-12 11:21:23 +01:00
Justus Matthiesen
2733ec2333 [ doc ] add lazy functions to changelog 2023-06-12 11:04:59 +01:00
Justus Matthiesen
6c6867490c [ test ] lazy functions 2023-06-12 11:04:59 +01:00
Justus Matthiesen
bb6db779ef [ fix #1066 ] do not insert TForce on LHS
When we encounter a delayed (explicit) function type during elaboration
of a LHS, we strip off the delay modality, continue elaboration and return a delayed version of the resulting type.

Note: defining delayed function via pattern matching is not currently
supported. Doing so will require adding a delay marker to LHSs/contexts
familiar from modal type theories. Implicit function are also currently
not supported.
2023-06-12 11:04:59 +01:00
Walter Smuts
98e5615dbc Typos: change all uses of inferable to inferrable
Achieves consistency...
2023-06-08 13:45:57 +02:00
Walter Smuts
e86420f710 Typos: specificy -> specify
Audit of "docs/" typos that did not have single match.
2023-06-08 13:41:58 +02:00
Walter Smuts
ab2d828887 Typos: Run 'typos -w' command over docs/
Only running over "docs/" directory since it will likely have the
largest postivie impact and cause fewest issues.

Typos will do simple find-and-replace when it detects a word not in it's
dictionary. It does not have any regard for formatting based on
surrounding context. Care must be taken not no merge variable names in
same scope etc.

Typos can be driven by Github Actions:
https://github.com/crate-ci/typos/blob/master/docs/github-action.md

Tool: https://github.com/crate-ci/typos
2023-06-08 13:41:54 +02:00
Leo
31c17ebec2
Add Pack to list of package managers (#2986)
* Add Pack to list of package managers

* Mention only Pack as package manager

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>

---------

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2023-06-02 07:27:12 +01:00
Aleksei Volkov
e594669210
[ fix #1878 ] Programmer-provided terms should be alwaysReduce (#2977)
* [ fix ] Programmer-provided terms should be alwaysReduce

This ports Edwin's commit that fixes the original issue back to Idris

Co-authored-by: Edwin Brady <ecb10@st-andrews.ac.uk>

* [ tests ] Added regression test for #1878

* Updated CHANGELOG.md and CONTRIBUTORS

---------

Co-authored-by: Edwin Brady <ecb10@st-andrews.ac.uk>
2023-06-01 17:08:02 +01:00
Justus Matthiesen
00af44c708
Ignore UseSide annotation in non-linear as-patterns (#2984)
Co-authored-by: Aleksei Volkov <volkov.aa@phystech.edu>
2023-06-01 14:34:57 +01:00
Thomas E. Hansen
50c56eac8f [ fix ] Revert lazy+codata being reserved prims
This reverts part of commit 4febd31c67.

Moved to PR #2992, as this reverted change is separate from adding
`:doc` support for these. There is potentially more discussion to be had
in the new PR.
2023-05-30 09:46:24 +02:00
Thomas E. Hansen
009eb270c1 Revert "[ fix ] Rename Prelude.Interface NS Lazy to ILazy"
This reverts commit bd231c2076, which is a
separate thing that should be its own PR.
2023-05-30 09:46:24 +02:00
Thomas E. Hansen
bcbe2b8c4f [ fix ] Rename Prelude.Interface NS Lazy to ILazy
This is required due to `Lazy` now being a reserved compiler primitive.

N.B. This may also break other dependencies and/or tools. Notably stuff
     outwith the Idris2 upstream. There's been some discussion in #2987.
2023-05-30 09:46:24 +02:00
Thomas E. Hansen
5519e5117f [ test ] Test :doc for laziness primitives 2023-05-30 09:46:24 +02:00
Thomas E. Hansen
1f7773ebf8 [ new ] Implement :doc for laziness primitives
* Restructured the parser to be a bit nicer around these as well
    (subject to approval).

Fixes #2599
2023-05-30 09:46:24 +02:00
Steve Dunham
360136ce25 [ doc ] Add correction to listing 6.9 in typedd.rst 2023-05-28 22:35:49 +01:00
Marshall Abrams
04c5531d9b Update typedd.rst
Re `cast` vs. `stringToNatOrZ` in the chapter 5 tip:

`cast` from `String` to `Nat` does work in Idris 2, version 0.6.0-a75161cb2, so the first sentence is not currently correct, and there is no change needed to make the code work.

In the Discord documentation channel, z_snail suggested changing the text to merely recommend changing `cast` to `stringToNatOrZ`.   This PR proposes that change.  I tried to change the text as little as possible, but I made some additional, strictly speaking unnecessary revisions, where I thought they would make the wording clearer given the essential changes.  I added a missing period as well.

(If the `cast` from `String` to `Nat` is destined to be removed, perhaps this PR should be ignored.)
2023-05-20 09:20:09 +01:00
Marshall Abrams
65569858fb Update typedd.rst: Chapter 5: new imports for exercises in 5.3.4
The instructions for the exercises at the end of section 5.3.4 list several file-handling functions needed for the exercises.  They were in the Prelude, but now are in `System.File.Handle` and `System.File.ReadWrite`, and I added a note about that.  (`import System.File` would work for the exercise code, but the docs aren't there, so I didn't mention that.  I also didn't mention there a few other definitions, in other modules, that one needs to look up to understand the functions that the book lists.  I think that figuring out that one needs to find those additional docs is supposed to be part of the exercise.)
2023-05-20 09:16:57 +01:00
Steve Dunham
d3e896ea09 [ fix ] Improve error messages at end of if statements 2023-05-20 09:16:25 +01:00
Denis Buzdalov
91b7aafb74 [ base ] Add generalisations of min and max for StronglyConnex 2023-05-15 19:15:36 +03:00
Aleksei Volkov
298f91cf0a
[ base ] Implemented Ord for Name, Namespace and UserName (#2973) 2023-05-15 14:45:42 +01:00
Marshall Abrams
8aa08b5a83 Update typedd.rst: fixed typo in function name, added page ref
readNumber_v2 should be readNumbers_v2.  I also added a remark pointing to the corresponding function definition in the book, for people who prefer to type  in the definitions themselves (like me) rather than using the source files in the repo. 

There's another issue with the chapter 5 tips, but I'm not sure what the right fix is, so I'll submit an issue.
2023-05-15 08:42:35 +01:00
Stefan Höck
2739c3a389
[ codegen ] more flexible array implementation on JS backends (#2966) 2023-05-14 06:45:50 +01:00
Steve Dunham
edc000c568 [ fix ] Fix issue parsing __LOC__ arguments 2023-05-14 06:45:33 +01:00
Steve Dunham
7221c99e93 [ error ] Improve error messages for indentation issues 2023-05-13 10:25:38 +01:00
Denis Buzdalov
c285ef06dd [ re #2960 ] Move defs of closures data types to a separate module 2023-05-11 15:31:45 +01:00
Asafov Alexander
6b768f28b1 Ignore tryAlt Result values in Core.Normalise.Eval 2023-05-09 11:42:10 +02:00
Asafov Alexander
2cafbe217b Returning function names evalConAlt and evalTree in Core.Normalise.Eval 2023-05-09 11:42:10 +02:00
Asafov Alexander
f93c927952 [ perf ] make Core.Normalise.Eval.evalDef stack safety 2023-05-09 11:42:10 +02:00
Robert Wright
9bfa04921a Add symmetric and transitive closure relations 2023-05-08 11:53:21 +01:00
stefan-hoeck
3c9393e5a8 [ codegen ] constant fold believe_me 2023-05-06 14:52:14 +01:00
Stefan Höck
e34b5a64f0
[ codegen ] get rid of trivial let statements (#2961) 2023-05-06 08:35:17 +01:00
madman-bob
a00b7ee7ec
Public export TTImp reflection functions (#2947)
Co-authored-by: Thomas E. Hansen <teh6@st-andrews.ac.uk>
Co-authored-by: Ohad Kammar <ohad.kammar@gmail.com>
2023-05-05 10:33:32 +01:00
stefan-hoeck
bc1a51ea18 [ regression ] revert to previous implementation of Show 2023-05-02 11:23:14 +02:00
stefan-hoeck
83f5ef27b6 [ new ] Eq, Ord, Semigroup, and Monoid for All 2023-05-02 11:23:14 +02:00
Denis Buzdalov
55efd7dd7b [ new ] Add Compose instances for Bi* interfaces, analogous to present 2023-04-25 12:59:25 +01:00
Mathew Polzin
177bcff725 [fix] Correct spellings of auto-implicit depth and metavar threshold. 2023-04-24 07:00:09 +01:00
Justus Matthiesen
360232de35 [ refactor ] renamed checkDesc to checkNonDesc 2023-04-23 17:42:04 +01:00
Justus Matthiesen
1d3bad7c0e [ doc ] reference to termination paper 2023-04-23 17:42:04 +01:00
Steve Dunham
97b7697a0e [ fix ] Issue in totality checking 2023-04-23 17:42:04 +01:00
Steve Dunham
3ad391d597
[ fix ] codegen issue when using partial case statements in prelude. (#2952) 2023-04-23 11:07:04 +01:00
Thomas E. Hansen
a423715da1 [ new ] Add compile.casetree.missing topic
This allows us to track when we're compiling non-covering case blocks.
2023-04-22 08:33:38 +01:00
Marshall Abrams
3eeb4f4cd3
Added notes: :exec needs to be passed main (#2946) 2023-04-16 08:10:08 +01:00
Steve Dunham
9544162bc4
[ new ] Add support for bi-directional pipes on POSIX systems (resolves #2935) (#2944) 2023-04-15 09:39:17 -05:00
Steve Dunham
a75161cb20 [ parser ] Improve error message for missing comma or period in forall. 2023-04-07 08:42:42 +01:00