Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support definitions for custom product types #98

Open
melvic-ybanez opened this issue Apr 24, 2022 · 0 comments
Open

Support definitions for custom product types #98

melvic-ybanez opened this issue Apr 24, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@melvic-ybanez
Copy link
Owner

Let's just limit ourselves with the following for now:

  1. Scala: class, case class and trait
  2. Java: class
  3. Haskell: record types

We can then use the assumption feature to declare instances:

case class Foo(name: String, age: Int)

assume foo: Foo

def myFoo: (Foo => String) => String

The output should be:

def myFoo: (Foo => String) => String =
  f => f(foo)
@melvic-ybanez melvic-ybanez added the enhancement New feature or request label Apr 24, 2022
@melvic-ybanez melvic-ybanez self-assigned this Apr 24, 2022
@melvic-ybanez melvic-ybanez changed the title Add support for declaring custom product types Add support for defining custom product types Apr 24, 2022
@melvic-ybanez melvic-ybanez changed the title Add support for defining custom product types Support definitions for custom product types Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant