implicit parameters
Dean Herington
heringto@cs.unc.edu
Thu, 17 Apr 2003 13:35:55 -0400
There's apparently something very basic that I don't understand about
implicit parameters. In the following program, compilation fails if
either of the type declarations is omitted. What is "implicit" about
implicit parameters, then?
{-# OPTIONS -fglasgow-exts #-}
main = print f1
f1 = let ?f = \ x -> x ++ x in f2
f2 :: (?f :: String -> String) => String
f2 = f3
f3 :: (?f :: String -> String) => String
f3 = ?f "x"