@rae: All about `deriving` in GHC

Поделиться
HTML-код
  • Опубликовано: 19 сен 2024

Комментарии • 7

  • @SEKUNHO
    @SEKUNHO 2 года назад +6

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

  • @pliftkl
    @pliftkl 2 года назад +1

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

  • @qseep
    @qseep 2 года назад +1

    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 года назад +1

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

  • @mehularora1813
    @mehularora1813 2 года назад

    Thank you, this was very helpful

  • @asitisj
    @asitisj 2 года назад

    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.