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

Type classes #102

Open
ppolesiuk opened this issue May 15, 2024 · 0 comments
Open

Type classes #102

ppolesiuk opened this issue May 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ppolesiuk
Copy link
Member

As mentioned in #95, type classes may solve the problems of termination checker for constraint solver. In Fram, type classes can be seen as sets of constraints (types, type classes, and methods) that can be attached to data. The syntax could be the following.

class C X =
  { T
  , method foo : X ->[] T
  , method bar : T ->[] X
  }

impl C Int =
  { T = Unit
  , method foo = ...
  }
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

2 participants