We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Newtype
Add Newtype
unreleased
It is solely to create a newtype just like an opaque type but with a few mandatory methods and type-classes.
newtype
opaque type
type Something = Something.Type object Something extends Newtype[String] { given eqMyType: Eq[Something] = deriving[Eq] given showMyType: Show[Something] = deriving[Show] }
Then it can be
val something = Something("blah") something.value // String = blah something.show // String = blah Something("blah") === Something("blah") // Boolean = true Something("blah") =!= Something("blah") // Boolean = false Something("blah") === Something("lala") // Boolean = false Something("blah") =!= Something("lala") // Boolean = true
The text was updated successfully, but these errors were encountered:
Close #44 - Add Newtype
fed541e
4cfef84
3394ffa
kevin-lee
Successfully merging a pull request may close this issue.
Summary
Add
Newtype
Version
unreleased
Description
It is solely to create a
newtype
just like anopaque type
but with a few mandatory methods and type-classes.Then it can be
The text was updated successfully, but these errors were encountered: