On Jul 10, 2007, at 15:59 , Andrew Coppin wrote:
I find myself wondering... A polymorphic type signature such as (a - > b) -> a -> b says "given that a implies b and a is true, b is 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] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon university KF8NH _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe