1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-14 17:32:00 +03:00
juvix/tests/positive
Paul Cadman 5b38727d39
Support uncurried higher order functions (#110)
* [minic] Translate TypeFunction to a C function pointer

* [minic] Add define macros for nullary functions

For example in the translation of:

inductive Nat {
  zero : Nat;
  suc : Nat → Nat;
};

The zero constructor is translated to a nullary C function:

static inline Nat_13_t * new_Zero_14_nullary()

and a macro:

\#define new_Zero_14 (new_Zero_14_nullary())

so that it can be referenced subsequently by the unapplied name
'new_Zero_14'.

A similar translation is applied to nullary top-level functions.

This means that uncurried higher-order functions now work.

* [chore] ormolu and hlint fixes

* [minic] Implement PR review suggestions

* [chore] Fix formatting
2022-05-17 15:12:36 +01:00
..
FullExamples Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
Imports Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
MicroJuvix Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
MiniC Support uncurried higher order functions (#110) 2022-05-17 15:12:36 +01:00
MiniHaskell Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
QualifiedConstructor Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
QualifiedSymbol Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
QualifiedSymbol2 Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
StdlibList Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
Termination Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
Axiom.mjuvix Add support for compile (by Jonathan) (#66) 2022-04-28 17:42:15 +02:00
Foreign.mjuvix [parser] Remove agda backend code (#86) 2022-05-05 15:11:18 +01:00
HelloWorld.mjuvix Add C code generation backend (#68) 2022-05-05 14:12:17 +01:00
Inductive.mjuvix [ pre-commit ] Add support and hooks 2022-04-04 17:44:08 +02:00
Literals.mjuvix [ pre-commit ] Add support and hooks 2022-04-04 17:44:08 +02:00
minijuvix.yaml Fix highlight command for modules with import statements (#102) 2022-05-13 16:17:26 +02:00
Operators.mjuvix [ pre-commit ] Add support and hooks 2022-04-04 17:44:08 +02:00
Polymorphism.mjuvix Monomorphization (#70) 2022-05-04 10:50:03 +02:00
ShadowPublicOpen.mjuvix v0.1.1 (#15) 2022-03-25 18:16:34 +01:00