
On Jul 10, 2007, at 15:59 , Andrew Coppin wrote:
b) -> a -> b says "given that a implies b and a is true, b is
I find myself wondering... A polymorphic type signature such as (a - true". But what does, say, "Maybe x -> x" say?
Actually, because parentheses naturally group to the right in type expressions in Haskell, (a -> b) -> a -> b is in fact (a -> b) -> (a -
b), a tautology. (This should be reasonably obvious.)
Maybe x -> x is a risky proposition, in a number of senses. :) It asserts that given something that may or may not be true, it is in fact guaranteed to be true. In the Haskell library this is the "fromJust" function, which throws an exception if x is *not* true (since it clearly can't satisfy the proposition). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH