2009/10/8 Jochem Berndsen <joc...@functor.nl>: > minh thu wrote: >> Also, I'd like to know why >> >> id id True >> >> is permitted but not >> >> (\f -> f f True) id > > If you want to do this, answer the question "what is the type of (\f -> > f f True)"? > You can do this, by the way, using rank-2 types: >> {-# LANGUAGE Rank2Types, PatternSignatures #-} >> thisIsAlwaysTrue = (\ (f :: forall a. a -> a) -> f f True) id > > Cheers, Jochem
So I learned we should be explicit about f being used polymorphically; that's what rank-2 types are for. (correct ?) Thanks, Thu _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe