https://github.com/monix/newtypes
Macro-free helpers for defining newtypes in Scala, cross-compiled to Scala 3.
https://github.com/monix/newtypes
Last synced: about 1 year ago
JSON representation
Macro-free helpers for defining newtypes in Scala, cross-compiled to Scala 3.
- Host: GitHub
- URL: https://github.com/monix/newtypes
- Owner: monix
- License: other
- Created: 2021-08-28T13:05:05.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-07T15:18:57.000Z (almost 2 years ago)
- Last Synced: 2025-05-12T22:49:54.376Z (about 1 year ago)
- Language: Scala
- Homepage: https://newtypes.monix.io/
- Size: 1.71 MB
- Stars: 87
- Watchers: 4
- Forks: 11
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Monix's Newtypes
[](https://github.com/monix/newtypes/actions/workflows/build.yml)
Macro-free helpers for defining newtypes in Scala, cross-compiled to Scala 3.
## Usage
The packages are published on Maven Central.
```scala
libraryDependencies += "io.monix" %% "newtypes-core" % "0.3.0"
```
For the [Circe integration](https://newtypes.monix.io/docs/circe.html):
```scala
// For Circe version 0.14.x
libraryDependencies += "io.monix" %% "newtypes-circe-v0-14" % "0.3.0"
```
For the [PureConfig integration](https://newtypes.monix.io/docs/pure-config.html):
```scala
// For PureConfig version 0.17.x
libraryDependencies += "io.monix" %% "newtypes-pureconfig-v0-17" % "0.3.0"
```
NOTE: the [version scheme](https://www.scala-lang.org/blog/2021/02/16/preventing-version-conflicts-with-versionscheme.html) is set to `early-semver`.
### Documentation
- [ScalaDoc API](https://newtypes.monix.io/api/)
- [Website](https://newtypes.monix.io/docs/)
- [Motivation](https://newtypes.monix.io/docs/motivation.html)
- [Defining Newtypes](https://newtypes.monix.io/docs/core.html)
- [Circe JSON integration](https://newtypes.monix.io/docs/circe.html)
## Acknowledgements
Encoding was shamelessly copied from the [scala-newtype](https://github.com/estatico/scala-newtype/) project by Cary Robbins et al.
## Contributing
This project welcomes contributions from anybody wishing to participate. All code or documentation that is provided must be licensed with the same license that Newtypes is licensed with (Apache 2.0, see [LICENCE](./LICENSE.md)).
People are expected to follow the [Scala Code of Conduct](./CODE_OF_CONDUCT.md) when discussing Newtypes on GitHub, Gitter channel, or other venues.
Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about the code. Pull requests are also gladly accepted. For more information, check out the [contributor guide](./CONTRIBUTING.md).
## License
All code in this repository is licensed under the Apache License, Version 2.0. See [LICENCE](./LICENSE.md).