dreixel / syb

Scrap Your Boilerplate generic programming library in Haskell
http://www.cs.uu.nl/wiki/GenericProgramming/SYB
Other
44 stars 23 forks source link

Generic schemes use foldl #34

Open isovector opened 3 years ago

isovector commented 3 years ago

I don't know enough to have a strong opinion here, but the HS community seems to be firmly behind using foldl' over foldl. However, this library uses foldl in a number of places:

https://github.com/dreixel/syb/blob/f741a437f18768f71586eeb47ffb43c0915f331b/src/Data/Generics/Schemes.hs#L122

https://github.com/dreixel/syb/blob/f741a437f18768f71586eeb47ffb43c0915f331b/src/Data/Generics/Schemes.hs#L132

https://github.com/dreixel/syb/blob/f741a437f18768f71586eeb47ffb43c0915f331b/src/Data/Generics/Schemes.hs#L140

https://github.com/dreixel/syb/blob/f741a437f18768f71586eeb47ffb43c0915f331b/src/Data/Generics/Schemes.hs#L202

This seems likely to be an easy performance win