
29 Apr
2014
29 Apr
'14
6:45 a.m.
In addition to the comments made by Daniel, as a general rule, you don’t want a sum type with selectors functions as your example stands, because you can end up with compiling programs like this: module Main where main :: IO ()main = let p = Child 10 age = adultAge p in print age this craps out with an error at runtime.