This website requires JavaScript.
Explore
Help
Sign In
anoma
/
juvix
Watch
1
Star
1
Fork
0
You've already forked juvix
mirror of
https://github.com/anoma/juvix.git
synced
2024-12-16 10:56:14 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
f0ade4be7c
juvix
/
tests
/
positive
/
MiniC
/
MultiModules
/
Data
/
String.juvix
11 lines
106 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Support partial application and closure passing in C backend (#190) * Add support for parital application eval/apply * include string.h in libc runtime * Add wasm SimpleFungibleTokenImplicit to tests * Update VP example to new syntax * propagate types from all reachable modules * Change prelude import ordering to workaround minic issue * Pre-declare inductive typedefs in C backend This generates the typedefs corresponding to each inductive type. e.g ``` inductive Bool { .. } ``` is translated to: ``` typedef struct Bool_3_s Bool_3_t; ``` This means that C code can reference these typedefs before they have been fully defined. (all references to inductive types go through these typedefs names). This fixes an issue with the ordering of delcarations when modules are included. * Use common Lib for MiniC tests * libc runtime: flush stdout after writing to it * Adds MiniTicTacToe example using common example lib In MonoJuvixToMiniC we emit the inductive type typedefs before anything else to support includes ordering * Adds tests for mutually recrusive functions * Add golden tests for milestone examples * Example: Remove commented out code * Test error handling behaviour in MiniTicTacToe * Fail clang compilation on warnings * Add test for Nested list types * Add PrettyCode instances for NonEmpty and ConcreteType * Ignore IsImplicit field in Eq and Hashable of TypeApplication This is to workaround a crash in Micro->Mono translation when looking up a concrete type * Fix formatting * hlint fixes * Formatting fixes not reported by local pre-commit * Refactor MonoJuvixToMiniC * Fix shelltest NB: We cannot check the order of the 'Writing' lines because this depends on the order of files returned by the FS which is non-deterministic between systems * Refactor Base to CBuilder * Refactor using applyOnFunStatement Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2022-06-28 11:25:43 +03:00
module Data.String;
Support multiple modules in compilation (#100) * translate MiniJuvix import statements to MicroJuvix include statements
2022-05-13 12:44:06 +03:00
axiom String : Type;
compile String {
ghc ↦ "[Char]";
c ↦ "char*";
};
end;
Reference in New Issue
Copy Permalink