News for hackers. Stuff that matters.
Re:Please do not attempt to simplify this code by mrgriffin on Friday December 28, 2018 @08:38AM (#18776605)
One of my favorite features of Haskell is that I can use where to write the auxiliary function definitions after the code that use them, but keep them scoped inside of a single function.

A relatively bad example here: https://wiki.haskell.org/Worker_wrapper#Hiding_the_worker

Re:Please do not attempt to simplify this code by yawaramin on Saturday December 29, 2018 @05:55PM (#18786201)
Bindings in the `where` clause can still access names in the main binding: https://wiki.haskell.org/Let_vs._Where#Advantages_of_where

This runs the risk of strongly coupling them to the main binding and making them less reusable. IMHO strong coupling where two bindings are aware of each others' internals should be avoided.

Re:Please do not attempt to simplify this code by cannabis_sam on Sunday December 30, 2018 @08:55AM (#18789171)
Like your link says: doesn’t lambda lifting solve that problem?

That’s what I always do if I want to move an auxillary function to the top-level for reusing elsewhere.

Re:Please do not attempt to simplify this code by yawaramin on Sunday December 30, 2018 @04:33PM (#18791464)
Indeed, I also prefer lifting, especially internally inside a module. It jives with the idea of loose coupling, strong cohesion.