Gabriel Dos Reis | 14 Feb 2012 09:54
Picon
Favicon

Re: [open-axiom-devel] record selector

"Serge D. Mechveliani" <mechvel@...> writes:

| In Spad,  rc.foo  
| 
| selects a field named  foo  in a record  rc.
| In Haskell, this is  
|                     foo rc   -- similar as applying any function.
| 
| Indeed,  foo  has type  Record(foo : Foo, ...) -> Foo.
| In particular, it allows, for example,  
|                               map foo (records :: List Record(...)).

Haskell does not really have first class records, Haskell' folks are
agonizing over how to properly define records in Haskell and what to do
with the dot notation.  See the various record and dot proposals and
ongoing discussion on Haskell' list.

  http://hackage.haskell.org/trac/ghc/wiki/Records/DotOperator

  http://www.haskell.org/pipermail/haskell-prime/2012-February/003515.html

  http://www.haskell.org/haskellwiki/TypeDirectedNameResolution

  http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution

-- Gaby

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
(Continue reading)


Gmane