( (7^7^7`mod`5`mod`2)==1, [False,True]!!(7^7^7`mod`5`mod`2) )
This yields: (True,False)
suggesting that the same arithmetic expression is both 1 and 0.In GHC, there is a dedicated flag to spot such cases (-fwarn-type-defaults).
In general, the guarentees that the type system actually gives and also the ways to specify them appear somewhat unfinished and are also quite hard to understand, often necessitating semantic restrictions and syntactic extensions. For further examples, see for instance:
https://stackoverflow.com/questions/27019906/type-inference-...
https://stackoverflow.com/questions/14865734/referential-tra...