In the following case:
```
module WrongConstructorArity;
inductive T {
A : T;
};
f : T → T;
f (A i) ≔ i;
end;
```
The typechecker fails when checking the clause `f (A i) := i` because of
the extra constructor argument. However if typechecking continues then
the variable `i` on the rhs does not have a type so we must short-circuit.
This adds `ansi-terminal` dependency to the Main target but this is
already a transitive dependency of `prettyprinter-ansi-terminal`.
We want to add this support globally which we will do in https://github.com/heliaxdev/minijuvix/issues/38.
For minihaskell the name of the output file needs to match the module
name. So we must not add the usual '_<nameid>' suffix to top level
names.
Additionally the main function in a haskell file is the entry-point to
the haskell program. So the suffix must not be added in this case also.
* [ format ] AbstractToMicroJuvix
* [ CI ] fixes
* [ CI ] fixes
* [ CI ] Using GHC 9.0 for Hlint
* [ CI ] Use static-checks for Dev as well
* [test] Add positive test for typechecker
* [test] Improve positive typechecker error output
* [typecheck] Restore correct handling of TypeAny
I mistakenly removed the matchTypes function in
https://github.com/heliaxdev/minijuvix/pull/22. This caused the handling
of TypeAny to break.
Literals have type TypeAny and so should be valid when matching against
any other type. The tests have been updated to reflect this.
* [test] Add positive MicroJuvix typecheck tests
* [ ormolu ] fixes
Co-authored-by: Jonathan Prieto-Cubides <jonathan.cubides@uib.no>
* [ format ] AbstractToMicroJuvix
* [ CI ] fixes
* [ CI ] fixes
* [ CI ] Using GHC 9.0 for Hlint
* [ CI ] Use static-checks for Dev as well
* [app] Add action hints for autocompletion
Using `action "file"` means that the autocompletion for that part of the
command will prompt the user with a list of files.
Without these action hints the user would have to type out the whole
path to the file without autocompletion assistance.
Co-authored-by: Jonathan Prieto-Cubides <jonathan.cubides@uib.no>