* Make CI even more pedantic
* remove aeson dependency
Co-authored-by: Paul Cadman <pcadman@gmail.com>
Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
* [cbackend] Adds an AST for C
This should cover enough C to implement the microjuvix backend.
* [cbackend] Add C serializer using language-c library
We may decide to write our own serializer for the C AST but this
demonstrates that the C AST is sufficient at least.
* [cbackend] Declarations will always be typed
* [cbackend] Add CPP support to AST
* [cbackend] Rename some names for clarity
* [cbackend] Add translation of InductiveDef to C
* [cbackend] Add CLI for C backend
* [cbackend] Add stdbool.h to file header
* [cbackend] Allow Cpp and Verbatim code inline
* [cbackend] Add a newline after printing C
* [cbackend] Support foreign blocks
* [cbackend] Add support for axioms
* [cbackend] Remove code examples
* [cbackend] wip FunctionDef including Expressions
* [parser] Support esacping '}' inside a foreign block
* [cbackend] Add support for patterns in functions
* [cbackend] Add foreign C support to HelloWorld.mjuvix
* hlint fixes
* More hlint fixes not picked up by pre-commit
* [cbackend] Remove CompileStatement from MonoJuvix
* [cbackend] Add support for compile blocks
* [cbackend] Move compileInfo extraction to MonoJuvixResult
* [minihaskell] Fix compile block support
* [chore] Remove ununsed isBackendSupported function
* [chore] Remove unused imports
* [cbackend] Use a Reader for pattern bindings
* [cbackend] Fix compiler warnings
* [cbackend] Add support for nested patterns
* [cbackend] Use functions to instantiate argument names
* [cbackend] Add non-exhaustive pattern error message
* [cbackend] Adds test for c to WASM compile and execution
* [cbackend] Add links to test dependencies in quickstart
* [cbackend] Add test with inductive types and patterns
* [cbackend] Fix indentation
* [cbackend] Remove ExpressionTyped case
https://github.com/heliaxdev/minijuvix/issues/79
* [lexer] Fix lexing of \ inside a foreign block
* [cbackend] PR review fixes
* [chore] Remove unused import
* [cbackend] Rename CJuvix to MiniC
* [cbackend] Rename MonoJuvixToC to MonoJuvixToMiniC
* [cbackend] Add test for polymorphic function
* [cbackend] Add module for string literals
* Parsing terminating keyword
* cosmetics
* Add support for `terminating` keyword to function decl.
* Minor replacement
* Fix .mjuxix to .mjuvix and the module name
* add TypeCallsBuilder and others
* implement propagation of type calls
* improve type propagation
* polymorphize fungible token
* sort type calls map pretty output
* use HashSet in TypeCallsMap
* renaming
* rename module
* improve indexing in type propagation
* draft monomorphization generation algorithm
* fix draft
* wip mono code generation
* wip code generation
* finish first candidate for code generation
* add monojuvix command
* fix MonoJuvix pretty printer to properly display name ids
* [monojuvix] improve clause pretty printing
* add support for function types in expressions
* properly translate function expressions
* ormolu
* add a basic positive test for monomorphization
* cleanup effect constraints
* collect type applications in axiom types
* apply some style improvements
* fix PolySimpleFungibleToken and add it to the test suite
* ignore polymorphic inductive definitions that are never used
* Add support for compile (by Jonathan)
* Remove error related to unsopported backend
Co-authored-by: Jonathan Prieto-Cubides <jonathan.cubides@uib.no>
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.