scrap-your-boilerplate Questions

1

Solved

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 ...
Unnecessary asked 21/10, 2022 at 4:6

1

Solved

Data defines as one of its core functions gfoldl: gfoldl :: (Data a) => (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a What...
Bandage asked 18/3, 2015 at 10:48

1

Solved

I see people talking about Scrap Your Boilerplate and generic programming in Haskell. What do these terms mean? When would I want to use Scrap Your Boilerplate, and how do I use it?

2

I found an interesting library in Haskell called Scrap Your Boilerplate based on a paper by Simon Peyton Jones which seems like an effective way to write code that can update large, deeply nested d...
Theophrastus asked 11/9, 2011 at 5:54

4

Solved

I've been fiddling around with the Elm compiler, which is written in Haskell. I'd like to start implementing some optimizations for it, and part of this involves traversing the AST and adding "ann...

1

Are any tasks that are possible only with SYB, or are much easier with it, when compared to GHC Generics?
Adaiha asked 12/11, 2014 at 18:5

1

Solved

I have a typeclass Cyclic for which I would like to be able to provide generic instances. class Cyclic g where gen :: g rot :: g -> g ord :: g -> Int Given a sum type of nullary constru...

3

I have a class identical to Show and I would like to make an instance of this class for each tuple type. Usually this is done by writing separately instances for each tuple type instance (Show a, ...
Hittite asked 27/12, 2013 at 18:51

2

Solved

I'm trying to learn GHC Generics. After reviewing several examples, I wanted to try to create a generic Functor instances (disregarding that GHC can derive them automatically for me). However, I re...
Crispy asked 19/7, 2013 at 16:17

2

Solved

In Scrap your boilerplate reloaded, the authors describe a new presentation of Scrap Your Boilerplate, which is supposed to be equivalent to the original. However, one difference is that they assu...
Osteen asked 1/3, 2013 at 14:46

4

I've come across references to Haskell's Data.Typeable, but it's not clear to me why I would want to use it in my code. What problem does it solve, and how?

1

Solved

I've used the Scrap Your Boilerplate and Uniplate libraries in the Haskell programming language, and I would find that form of generic programming over discriminated unions to be really useful. Is ...
1

© 2022 - 2024 — McMap. All rights reserved.