Questions tagged [syb]

Scrap Your Boilerplate (syb) is an infrastructure for generic programming in Haskell.

https://wiki.haskell.org/Scrap_your_boilerplate

3 questions
1
vote
2 answers

SYB `mkT` function in Scala

Continuing on from a previous question of mine, I am attempting to implement Scrap Your Boilerplate in scala 3 and am running into an issue now with the mkT function described in the paper. Given the following definition of cast: trait Cast[A,…
anqit
  • 780
  • 3
  • 12
0
votes
1 answer

SYB `cast` function in Scala

I am reading the Scrap Your Boilerplate paper and trying to follow along by implementing the ideas in scala as best I can. However, I'm stuck on the very first function, the cast, which is used to take a value and attempt to cast it to another type…
anqit
  • 780
  • 3
  • 12
0
votes
1 answer

How to use syb mkM

I just discovered power of syb library and trying to find its limits. I've got everywhere working: > :set -XDeriveDataTypeable > :set -XGeneralizedNewtypeDeriving > import Data.Generics > newtype MyInt = MyInt Int deriving (Show, Eq, Num, Ord,…
Daniil Iaitskov
  • 5,525
  • 8
  • 39
  • 49