I'm reading a book about Haskell, a programming language, and I came across a construct defined "algebraic data type" that looks like
data WeekDay = Mon | Tue | Wed | Thu | Fri | Sat | Sun
That simply declares what are the possible values for the type WeekDay.
My question is what is the meaning of algebraic data type (for a mathematician) and how that maps to the programming language construct?