How is Int actually defined in Haskell?
问题 The Learn You A Haskell for Great Good! book by Miran Lipovača says in the chapter Making Our Own Types and Typeclasses that the idea of Haskell's Int type could be represented like this: data Int = -2147483648 | -2147483647 | ... | -1 | 0 | 1 | 2 | ... | 2147483647 Nevertheless, it says that it worked just as demonstrative purposes, but it doesn't say how Int is actually defined. Is Int defined especially by the compiler or can it be definable with plain Haskell code? 回答1: http://hackage