16 Sep
2001
16 Sep
'01
9:44 a.m.
Sun, 16 Sep 2001 16:28:01 +0800 (GMT-8), Saswat Anand <saswatan@comp.nus.edu.sg> pisze:
trickyFun fun = let x = fun (2::Int) -----------(1) y = fun 'c' -----------(2) in "tricky"
It can't be done this way in standard Haskell. In GHC and Hugs you can use local universal quantifaction by writing explicit type signature: trickyFun :: (forall a. X a => a -> b) -> String GHC needs to be run with -fglasgow-exts, Hugs needs -98. GHC user's guide describes some limitations, e.g. trickyFun must always be directly applied to an argument. -- __("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK
9113
Age (days ago)
9113
Last active (days ago)
0 comments
1 participants
participants (1)
-
Marcin 'Qrczak' Kowalczyk