[Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

Fraser Wilson blancolioni at gmail.com
Thu Nov 17 13:22:24 EST 2005


On 11/17/05, Greg Woodhouse <gregory.woodhouse at sbcglobal.net> wrote:
>
> Isn't there a potential for confusion with function composition (f . g)?
>

Perhaps, but I always have spaces on either side when it's function
composition. Isn't there already an ambiguity?

-- I bet there's a quicker way to do this ...
module M where data M a = M a deriving (Show)
data T a = T a deriving (Show)
module M.T where f = (+1)

import M
import qualified M.T

f = (*2)
v1 = M . T . f $ 5
v2 = M.T.f $ 5

main = do { print v1; print v2; return () }

Fraser.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/haskell-cafe/attachments/20051117/be671e1b/attachment-0001.htm


More information about the Haskell-Cafe mailing list