News for hackers. Stuff that matters.
Re:Dimensions and Haskell: Singletons in Action by kccqzy on Friday July 19, 2019 @04:35PM (#20482229)
Singletons are one of the ugliest things in Haskell. They require lots of extensions, implemented in a complicated way, and leaks implementation detail. Which makes debugging compile-time errors using them quite hard. I'd rather debug a runtime error with proper HasCallstack constraints.
Re:Dimensions and Haskell: Singletons in Action by Haskell-mouse on Friday July 19, 2019 @06:53PM (#20483111)
Hi! I am one the author of this post. I agree that Singletons are ugly. But:

1) Without them, creating a bridge between types and values became a real hell. 2) HasCallstack just gives you a place of an exception. It does not give you a cause. And part of errors even does not lead to exceptions at all.

Just want to say, that idea described in the post arose only after hard debugging. And using singletons was much easies and more reliable. And we tried to explain and analyse our personal experience.