Releases: melvic-ybanez/chi
Releases · melvic-ybanez/chi
v0.1.0-RC
The main focus of this release was the support for Java syntax:
chi> <A, B> B apply(A a, Function<A, B> f)
Detected language: Java
Generated code:
<A, B> B apply(A a, Function<A, B> f) {
return f.apply(a);
}
chi> <A, B, C> Function<A, C> compose(Function<B, C> f, Function<A, B> g)
Detected language: Java
Generated code:
<A, B, C> Function<A, C> compose(Function<B, C> f, Function<A, B> g) {
return a -> f.apply(g.apply(a));
}
chi> <A, B, C> BiFunction<A, B, C> foo(Function<A, C> f)
Detected language: Java
Generated code:
<A, B, C> BiFunction<A, B, C> foo(Function<A, C> f) {
return (a, b) -> {
f.apply(a)
};
}
What's Changed
- Better readme by @melvic-ybanez in #24
- Syntax support for Java by @melvic-ybanez in #28
- Update readme by @melvic-ybanez in #29
Full Changelog: v0.1.0-beta...v0.1.0-rc
Edit: The last Java example isn't working in this release (I realized this too late). However, in the latest code the issue has been fixed.
v0.1.0-beta
This release focused on bug fixes, particularly the disjunction elimination and exhaustive search for functions by their consequents.
For example, the following shows correct derivation of code based on disjunction-elimination:
chi> def foo[A, B, C]: (A => C) => (B => C) => Either[A, B] => C
def foo[A, B, C]: ((A => C) => ((B => C) => (Either[A, B] => C))) =
f => g => e => e match {
case Left(a) => f(a)
case Right(b) => g(b)
}
chi> def foo[A]: Either[A, A] => A
def foo[A]: (Either[A, A] => A) =
e => e match {
case Left(a) => a
case Right(a) => a
}
What's Changed
- Create LICENSE by @melvic-ybanez in #15
- Fix issue on fail-fast assumption search by @melvic-ybanez in #21
- Rules by @melvic-ybanez in #23
Full Changelog: v0.1.0-alpha...v0.1.0-beta
v0.1.0-alpha
This release supports a REPL that allows the users to enter function signatures and see the results immediately. In the current version, Chi only recognizes the Scala syntax.