corollary
corollary copied to clipboard
Cross-compiler from Haskell to Rust, plus parser-haskell.
When I try to run `cargo test` on corollary (after pointing it to a manually-fixed version of petgraph 0.1.18 since that broke on nightly recently), it fails to parse any...
This project was instrumental in helping port over [parser-c](http://github.com/tcr/parser-c). I think there's a lot of potential in exploring what automated conversion from Haskell to Rust can do, given the similarities...
There are a few places in translated code in which /* Expr::Error */ is printed instead of whatever value it should have been. These should be diagnosed and cleaned up....
When a generator is encountered in code, we just output it as a `/* TODO: Generator */` comment. These are used a few times around the libraries we're porting so...
Similar to how top-level functions with multiple definitions are folded into a match statement (see the comment "There are multiple impls of this function, so expand this into a case...
This translates incorrectly. We should look at the type signature, and if there are extra arguments in its type that are not in the function arguments, it should be rewritten...
e.g. ``` promote :: (Pretty node, Pos node) => node -> (Rust.Expr -> Rust.Expr -> Rust.Expr) -> Result -> Result -> EnvMonad s Result ```
Obviously this isn't Rust's `return`, but it should do the right thing in monadic sequences.
There are only a few instances of these in the codebase (see C.lhs) but it should be parsed properly at least. ``` CIntConst (CInteger v repr flags) _ -> let...