lean4-htt/tests/lean
Leonardo de Moura 06ad52575a feat: force users to use discard when action result is not being bound and it is not PUnit
After this commit, we have to use an explicit `discard` in code such as
```
def g (x : Nat) : IO Nat := ...
def f (x : Nat) : IO Unit := do
  discard <| g x   -- type error without the `discard`
  IO.println x
```

Motivation: prevent users from making mistakes such as
```
def f (xs : Array Nat) : IO Unit := do
  xs.set! 0 1
  IO.println xs
```
when they meant to write
```
def f (xs : Array Nat) : IO Unit := do
  let xs := xs.set! 0 1
  IO.println xs
```
2020-12-08 06:14:48 -08:00
..
Reformat test: bring back Reformat.lean on abbreviated copy of Prelude.lean 2020-11-25 11:30:24 +01:00
run feat: force users to use discard when action result is not being bound and it is not PUnit 2020-12-08 06:14:48 -08:00
server chore: fix tests 2020-10-25 09:11:13 -07:00
trust0 chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
.gitignore
217.lean fix: fixes #217 2020-11-12 14:36:47 -08:00
217.lean.expected.out feat: hide inaccessible names and add pp.inaccessibleNames 2020-11-25 17:22:09 -08:00
220.lean fix: fixes #220 and #223 2020-11-24 10:18:02 -08:00
220.lean.expected.out fix: fixes #220 and #223 2020-11-24 10:18:02 -08:00
223.lean fix: fixes #220 and #223 2020-11-24 10:18:02 -08:00
223.lean.expected.out fix: fixes #220 and #223 2020-11-24 10:18:02 -08:00
abst.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
abst.lean.expected.out
appParserIssue.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
appParserIssue.lean.expected.out
attrCmd.lean chore: avoid Has prefix in type classes 2020-10-27 18:29:19 -07:00
attrCmd.lean.expected.out chore: avoid Has prefix in type classes 2020-10-27 18:29:19 -07:00
autoBoundImplicits1.lean feat: insert auto bound implicit arguments before explicitly provided ones 2020-11-28 12:45:57 -08:00
autoBoundImplicits1.lean.expected.out feat: insert auto bound implicit arguments before explicitly provided ones 2020-11-28 12:45:57 -08:00
autoBoundImplicits2.lean feat: autoBoundImplicit for universes 2020-11-28 12:45:57 -08:00
autoBoundImplicits2.lean.expected.out feat: heterogeneous Append experiment 2020-12-01 16:32:41 -08:00
auxDeclIssue.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
auxDeclIssue.lean.expected.out
binsearch.lean refactor: heterogeneous operators 2020-12-01 14:02:46 -08:00
binsearch.lean.expected.out
bytearray.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
bytearray.lean.expected.out
class_def_must_fail.lean chore: fix tests 2020-10-25 09:11:13 -07:00
class_def_must_fail.lean.expected.out chore: fix tests 2020-10-25 09:11:13 -07:00
classBadOutParam.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
classBadOutParam.lean.expected.out
collectDepsIssue.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
collectDepsIssue.lean.expected.out
ctor_layout.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
ctor_layout.lean.expected.out
dbgMacros.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
dbgMacros.lean.expected.out
decimals.lean feat: basic support for scoped attributes 2020-12-03 10:39:59 -08:00
decimals.lean.expected.out feat: scientific notation 2020-12-03 07:49:20 -08:00
defaultInstance.lean feat: default instances 2020-11-21 14:44:40 -08:00
defaultInstance.lean.expected.out feat: hide inaccessible names and add pp.inaccessibleNames 2020-11-25 17:22:09 -08:00
doIssue.lean feat: force users to use discard when action result is not being bound and it is not PUnit 2020-12-08 06:14:48 -08:00
doIssue.lean.expected.out feat: force users to use discard when action result is not being bound and it is not PUnit 2020-12-08 06:14:48 -08:00
doNotation1.lean feat: only allow variables declared with mut to be reassigned 2020-11-07 17:32:13 -08:00
doNotation1.lean.expected.out feat: only allow variables declared with mut to be reassigned 2020-11-07 17:32:13 -08:00
doSeqRightIssue.lean feat: autoBoundImplicit for universes 2020-11-28 12:45:57 -08:00
doSeqRightIssue.lean.expected.out feat: heterogeneous Append experiment 2020-12-01 16:32:41 -08:00
emptyc.lean chore: avoid Has prefix in type classes 2020-10-27 18:29:19 -07:00
emptyc.lean.expected.out chore: avoid Has prefix in type classes 2020-10-27 18:29:19 -07:00
envExtensionSealed.lean chore: move to new frontend 2020-10-21 13:30:43 -07:00
envExtensionSealed.lean.expected.out chore: move to new frontend 2020-10-21 13:30:43 -07:00
eval_except.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
eval_except.lean.expected.out
evalWithMVar.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
evalWithMVar.lean.expected.out
exitAfterParseError.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
exitAfterParseError.lean.expected.out chore: fix test 2020-11-23 18:34:38 -08:00
extract.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
extract.lean.expected.out
file_not_found.lean chore: remove dead files and functions 2020-11-10 18:37:15 -08:00
file_not_found.lean.expected.out
Format.lean chore: move to new frontend 2020-10-21 16:35:50 -07:00
Format.lean.expected.out
funExpected.lean refactor: heterogeneous operators 2020-12-01 14:02:46 -08:00
funExpected.lean.expected.out refactor: heterogeneous operators 2020-12-01 14:02:46 -08:00
hidingInaccessibleNames.lean feat: hide inaccessible names and add pp.inaccessibleNames 2020-11-25 17:22:09 -08:00
hidingInaccessibleNames.lean.expected.out feat: hide inaccessible names and add pp.inaccessibleNames 2020-11-25 17:22:09 -08:00
holeErrors.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
holeErrors.lean.expected.out feat: hide auxiliary metavariables used to compile let-rec 2020-10-30 14:58:17 -07:00
holes.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
holes.lean.expected.out
hygienicIntro.lean fix: ambiguity at induction/cases 2020-11-24 14:59:12 -08:00
hygienicIntro.lean.expected.out
inductionErrors.lean fix: ambiguity at induction/cases 2020-11-24 14:59:12 -08:00
inductionErrors.lean.expected.out feat: support for _ and ?hole at all induction/cases variants 2020-11-03 17:20:53 -08:00
inductive1.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
inductive1.lean.expected.out chore: move to new frontend 2020-10-16 09:16:33 -07:00
infoFromFailure.lean chore: avoid Has prefix in type classes 2020-10-27 18:29:19 -07:00
infoFromFailure.lean.expected.out feat: change synthinstance threshold 2020-12-07 10:45:08 -08:00
inst.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
inst.lean.expected.out
invalidNamedArgs.lean feat: improve invalid named argument error message 2020-10-23 06:47:07 -07:00
invalidNamedArgs.lean.expected.out feat: improve invalid named argument error message 2020-10-23 06:47:07 -07:00
IRbug.lean chore: avoid Has prefix in type classes 2020-10-27 18:29:19 -07:00
IRbug.lean.expected.out
json.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
json.lean.expected.out
letrec1.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
letrec1.lean.expected.out
letrecErrors.lean fix: registerLetRecsToLift 2020-11-18 18:47:22 -08:00
letrecErrors.lean.expected.out fix: registerLetRecsToLift 2020-11-18 18:47:22 -08:00
ll_infer_type_bug.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
ll_infer_type_bug.lean.expected.out chore: fix tests 2020-10-25 09:11:13 -07:00
lvl1.lean chore: cleanup src/Array/Basic.lean 2020-10-28 19:35:42 -07:00
lvl1.lean.expected.out
macroPrio.lean feat: allow user to assign parsing priorities in the macro and elab commands 2020-10-29 20:33:51 -07:00
macroPrio.lean.expected.out feat: allow user to assign parsing priorities in the macro and elab commands 2020-10-29 20:33:51 -07:00
macroscopes.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
macroscopes.lean.expected.out
macroStack.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
macroStack.lean.expected.out refactor: heterogeneous operators 2020-12-01 14:02:46 -08:00
match1.lean fix: pretty print empty matchers as nomatch 2020-11-25 11:30:24 +01:00
match1.lean.expected.out feat: improve inferAppType 2020-12-06 19:01:23 -08:00
match2.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
match2.lean.expected.out
match3.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
match3.lean.expected.out
match4.lean refactor: use Lists for Array reference implementation 2020-11-17 17:05:53 -08:00
match4.lean.expected.out
matchErrorLocation.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
matchErrorLocation.lean.expected.out
mutualdef1.lean feat: add support for unbound implicit locals 2020-11-20 12:22:27 -08:00
mutualdef1.lean.expected.out
mutualWithNamespaceMacro.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
mutualWithNamespaceMacro.lean.expected.out
mvar1.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
mvar1.lean.expected.out
mvar2.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
mvar2.lean.expected.out
mvar3.lean chore: fix tests 2020-11-11 10:19:14 -08:00
mvar3.lean.expected.out
mvar_fvar.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
mvar_fvar.lean.expected.out
namedHoles.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
namedHoles.lean.expected.out
namelit.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
namelit.lean.expected.out chore: fix tests 2020-11-11 10:19:14 -08:00
nonReserved.lean fix: notation for non reserved symbols 2020-11-17 11:25:04 -08:00
nonReserved.lean.expected.out feat: add support for nonReservedSymbol at syntax command 2020-11-12 07:32:18 -08:00
openExport.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
openExport.lean.expected.out
parserPrio.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
parserPrio.lean.expected.out feat: pretty print lists and arrays 2020-11-10 10:11:24 -08:00
phashmap_inst_coherence.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
phashmap_inst_coherence.lean.expected.out chore: avoid Has prefix in type classes 2020-10-27 18:29:19 -07:00
ppExpr.lean refactor: remove MonadIO 2020-11-18 18:47:22 -08:00
ppExpr.lean.expected.out feat: delaborator: apply pp options from Expr.mdata nodes 2020-11-03 12:36:33 +01:00
PPRoundtrip.lean feat: force users to use discard when action result is not being bound and it is not PUnit 2020-12-08 06:14:48 -08:00
PPRoundtrip.lean.expected.out feat: force users to use discard when action result is not being bound and it is not PUnit 2020-12-08 06:14:48 -08:00
ppSyntax.lean refactor: remove MonadIO 2020-11-18 18:47:22 -08:00
ppSyntax.lean.expected.out fix: fix pretty printers for imported ParserDescrs 2020-11-07 17:05:07 +01:00
precissues.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
precissues.lean.expected.out fix: break grouped fill items containing hard line breaks 2020-10-14 14:24:47 +02:00
private.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
private.lean.expected.out
Process.lean feat: force users to use discard when action result is not being bound and it is not PUnit 2020-12-08 06:14:48 -08:00
Process.lean.expected.out fix: redirect child I/O to null on Process.Stdio.null 2020-11-27 13:17:32 -08:00
protected.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
protected.lean.expected.out chore: avoid Has prefix in type classes 2020-10-27 18:29:19 -07:00
pureCoeIssue.lean fix: tryPureCoe? 2020-11-22 08:24:56 -08:00
pureCoeIssue.lean.expected.out feat: force users to use discard when action result is not being bound and it is not PUnit 2020-12-08 06:14:48 -08:00
readlinkf.sh
ref1.lean feat: force users to use discard when action result is not being bound and it is not PUnit 2020-12-08 06:14:48 -08:00
ref1.lean.expected.out
Reformat.lean feat: name resolution during parsing 2020-12-03 17:46:13 +01:00
Reformat.lean.expected.out feat: formatter: preserve comments 2020-11-25 11:30:24 +01:00
repr_issue.lean chore: remove $. notation 2020-11-19 08:47:35 -08:00
repr_issue.lean.expected.out
resolveGlobalName.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
resolveGlobalName.lean.expected.out
rewrite.lean chore: fix tests 2020-11-29 17:05:43 -08:00
rewrite.lean.expected.out feat: hide inaccessible names and add pp.inaccessibleNames 2020-11-25 17:22:09 -08:00
runSTBug.lean fix: bug at runST and runEST 2020-12-06 18:52:28 -08:00
runSTBug.lean.expected.out fix: bug at runST and runEST 2020-12-06 18:52:28 -08:00
sanitizeMacroScopes.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
sanitizeMacroScopes.lean.expected.out chore: add Elab.command trace class 2020-10-18 16:35:08 -07:00
scopedInstanceOutsideNamespace.lean feat: ensure scoped instances cannot be used outside namespaces 2020-12-05 16:26:31 -08:00
scopedInstanceOutsideNamespace.lean.expected.out feat: ensure scoped instances cannot be used outside namespaces 2020-12-05 16:26:31 -08:00
scopedLocalInsts.lean test: scoped and local instances 2020-12-05 16:10:27 -08:00
scopedLocalInsts.lean.expected.out test: scoped and local instances 2020-12-05 16:10:27 -08:00
scopedunifhint.lean feat: scoped and local unification hints 2020-12-05 14:34:14 -08:00
scopedunifhint.lean.expected.out feat: scoped and local unification hints 2020-12-05 14:34:14 -08:00
shadow.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
shadow.lean.expected.out
smartUnfolding.lean test: smart unfolding 2020-11-15 16:36:22 -08:00
smartUnfolding.lean.expected.out test: smart unfolding 2020-11-15 16:36:22 -08:00
stdio.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
stdio.lean.expected.out
string_imp.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
string_imp.lean.expected.out
string_imp2.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
string_imp2.lean.expected.out
struct1.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
struct1.lean.expected.out
structAutoBound.lean feat: add support for auto bound implicits to the structure command 2020-11-29 14:39:51 -08:00
structAutoBound.lean.expected.out feat: add support for auto bound implicits to the structure command 2020-11-29 14:39:51 -08:00
StxQuot.lean feat: antiquotation scopes 2020-12-04 19:24:32 +01:00
StxQuot.lean.expected.out chore: fix test 2020-12-04 18:13:36 -08:00
syntaxErrors.lean feat: improve error messages for syntax command 2020-11-17 10:33:53 -08:00
syntaxErrors.lean.expected.out feat: improve error messages for syntax command 2020-11-17 10:33:53 -08:00
syntaxInNamespacesAndPP.lean fix: SyntaxNodeKind for syntax declarations nested in namespaces 2020-11-05 15:31:50 -08:00
syntaxInNamespacesAndPP.lean.expected.out chore: fix tests 2020-11-11 19:09:23 -08:00
test_single.sh
typeMismatch.lean chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
typeMismatch.lean.expected.out refactor: remove MonadIO 2020-11-18 18:47:22 -08:00
typeOf.lean refactor: heterogeneous operators 2020-12-01 14:02:46 -08:00
typeOf.lean.expected.out refactor: heterogeneous operators 2020-12-01 14:02:46 -08:00
uintCtors.lean fix: UInt ctors/fields in generated code 2020-11-14 12:50:32 -08:00
uintCtors.lean.expected.out fix: UInt ctors/fields in generated code 2020-11-14 12:50:32 -08:00
univInference.lean fix: improve structure/inductive commands universe level inference and validation 2020-10-25 05:46:51 -07:00
univInference.lean.expected.out fix: improve structure/inductive commands universe level inference and validation 2020-10-25 05:46:51 -07:00
unknownTactic.lean feat: better error message for "unknown" tactic 2020-10-30 14:58:17 -07:00
unknownTactic.lean.expected.out feat: better error message for "unknown" tactic 2020-10-30 14:58:17 -07:00
unnecessaryUnfolding.lean fix: unnecessary unfolding 2020-11-27 13:08:18 -08:00
unnecessaryUnfolding.lean.expected.out fix: unnecessary unfolding 2020-11-27 13:08:18 -08:00
unsolvedIndCases.lean fix: ambiguity at induction/cases 2020-11-24 14:59:12 -08:00
unsolvedIndCases.lean.expected.out fix: error position for unsolved goals at cases and induction tactics 2020-11-13 07:59:50 -08:00
unused_univ.lean feat: add support for unbound implicit locals 2020-11-20 12:22:27 -08:00
unused_univ.lean.expected.out
zipper.lean chore: fix tests 2020-11-25 09:25:45 -08:00
zipper.lean.expected.out