https://github.com/konn/newtype-talk-five
Haskell's newtype functionality and DerivingVia explained (Japanese talk at FIVE)
https://github.com/konn/newtype-talk-five
Last synced: about 1 month ago
JSON representation
Haskell's newtype functionality and DerivingVia explained (Japanese talk at FIVE)
- Host: GitHub
- URL: https://github.com/konn/newtype-talk-five
- Owner: konn
- License: bsd-3-clause
- Created: 2018-08-07T06:31:02.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-24T08:11:31.000Z (over 6 years ago)
- Last Synced: 2025-03-24T21:38:52.648Z (about 2 months ago)
- Language: Haskell
- Homepage:
- Size: 7.71 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# Playground for `DerivingVia` language extension of GHC 8.6
* Talk Slides (in Japanese): [Speaker Deck][SD], [PDF][PDF], [Keynote][Keynote]
* English version: [Speaker Deck][SDE], [PDF][PDFE], [Keynote][KeynoteE]## Explanation
- **[`example.hs`](app/example.hs)**
User-site example of `DerivingVia`, including isomorphic instance derivation exmaples.
- **[`Data.Aeson.Generic.DerivingVia`](src/Data/Aeson/Generic/DerivingVia.hs)**
Detailed implementation for the type-driven derivation interface for JSON (de)serialisation with `DerivingVia` and type-level hacks.
- **[`Data.DerivingIso`](src/Data/DerivingIso.hs)**
Derivation between isomorphic types with `DerivingVia`, as described in the [original paper][paper].
- **[`Data.Foldable.Monoid`](src/Data/Foldable/Monoid.hs)**
Expository module which describes the connection between `Foldable` (and `Traversable`) and [free monoid constructions][free].
This also utilizes the [`QuantifiedConstraints`][QC] extension to express the freeness as a type-class constraint, which is also introduced in GHC 8.6.[SD]: http://bit.ly/derivia
[PDF]: slides/slide.pdf
[Keynote]: slides/slide.key
[SDE]: http://bit.ly/derivia-eng
[PDFE]: slides/slides-english.pdf
[KeynoteE]: slides/slides-english.key
[paper]: https://www.kosmikus.org/DerivingVia/deriving-via-paper.pdf
[free]: https://en.wikipedia.org/wiki/Free_object[QC]: https://ghc.haskell.org/trac/ghc/wiki/QuantifiedConstraints