@rae: All about `deriving` in GHC

Ғылым және технология

I walk through the four different strategies GHC uses to implement `deriving` when declaring a new datatype.
Previous video focusing on -XDerivingVia: • @rae: Avoid boilerplat...
Find me at richarde.dev/ or on Twitter at @RaeHaskell.
Video index at richarde.dev/videos.html

Пікірлер: 7

  • @SEKUNHO
    @SEKUNHO2 жыл бұрын

    This is a great video. I like the pacing, and how focused it is (no switching of windows or tabs). Thank you!

  • @pliftkl
    @pliftkl2 жыл бұрын

    Great pacing, great delivery. Learned a lot - now wandering off to watch your other videos!

  • @qseep
    @qseep2 жыл бұрын

    Fantastic, clear explanation, with good examples and motivation. @rae, could you please make a follow-up video explaining type roles (nominal, representational, and phantom), and how they fit into deriving?

  • @qseep

    @qseep

    2 жыл бұрын

    I guess the video “Roles can break abstraction” covers that?

  • @mehularora1813
    @mehularora18132 жыл бұрын

    Thank you, this was very helpful

  • @asitisj
    @asitisj2 жыл бұрын

    Isn't this type wrapper mkage just a sub-type of mkt?

  • @asdfghyter

    @asdfghyter

    2 жыл бұрын

    `T` and `Age` really doesn't have any formal relation at all. You can't coerce from one to the other since they have different runtime representations and their instances are completely different. I don't think they would be in a subtype relation even in an OOP language. Age might have been a subtype of Int in an OOP language, but that is still not the case here, since their instances are independent of each other. We could even use deriving via to copy instances in the reverse direction: *from* Age *to* Int.

Келесі