18

Generally Haskell libraries make a point of making impossible states unrepresentable in the types. But I often see Int used where only a non-negative number makes sense. Why is Word not used in those cases?

user2141650
  • 2,827
  • 1
  • 15
  • 23

1 Answers1

21

We only just now got Numeric.Natural in base, too.

I think it is just historical accident. Int and Integer were in the haskell 98 prelude, which didn't get bogged down with lots of other fixed-size integer types.

Doug McClean
  • 14,265
  • 6
  • 48
  • 70