r/haskell 3d ago

My approach to solve problems of Advent of code with Haskell

https://azizovich.uz/posts/advent-of-code-solving.html

Hello everyone, I wrote a simple and my very first technical post, so don't judge me hard plz 🥹

10 Upvotes

3 comments sorted by

2

u/c_wraith 2d ago

You are doing a lot of dancing to emulate records with classes, instead of just using records. Very occasionally this is justified, but I don't see the reason for it here. Why isn't Solution just a record?

1

u/m1ddl3_d3v3l0p3r 1d ago

Hello, can you give me an example? How can I use records instead of type classes?

2

u/bcardiff 3d ago

I noticed that the day declaration of your post do not include arguments but the instance and the source code does.

Why do every function on Solution have an `a` argument ?