Cardinality estimation in Haskell.