[Haskell] type question revisited

mv mv42c at dodo.com.au
Fri Jun 3 03:58:34 EDT 2005


I answered my own question only to raise another - what I wanted to do is
this


> foo :: (a -> String) -> [a] -> [String]
> foo shw  x  =
>   let
>          shf :: ( forall a . a ) -> String
>          shf o = shw o
>
>   in  map shf x

the type of shf is a rank 2 type - but how do you map it ? as the above
gives
thise error in hugs:

Use of shf requires at least 1 argument




____________
Virus checked by G DATA AntiVirusKit
Version: AVK 12.0.37 from 06.12.2002
Virus news: www.antiviruslab.com



More information about the Haskell mailing list