Edward Kmett ekm...@gmail.com writes:
If you really want to hunt for unused syntax and we wind up needing a (.)
analogue then (-) is currently a reserved operator, so opening it up for
use at the term level could be made to work, and there is a precedent with
c/c++ pointer dereferencing.
(sorry, accidentally failed to send this to the list)
All this extra syntax, whether it's ., #, or {} seems very heavy for a problem
described as very rare.
Why not simply use a declaration
field name
whose effect is to declare
name :: r {name ::t} = r - t
name =
Hi,
this is related to
http://hackage.haskell.org/trac/ghc/wiki/NewtypeWrappers#Proposal3.
I tried to hack up a little prototype of this, and this “works” now:
import GHC.NT
newtype Age = Age Int deriving Show
ageNT :: NT Age Int
ageNT = createNT
Hi all,
I have amended the plan [1] as a result of the ongoing discussion,
including leaving the syntax alone for the time being, so record
projections are written prefix.
Regarding Barney's suggestion of field declarations:
On 01/07/13 10:50, Barney Hilken wrote:
All this extra syntax,
Sure. I'd rather have nothing, but at least unlike the (.) proposals it doesn't
break existing code.
That said I don't think we need either.
On Jul 1, 2013, at 2:27 AM, John Wiegley jo...@fpcomplete.com wrote:
Edward Kmett ekm...@gmail.com writes:
If you really want to hunt for unused
It strikes me that there is a fairly major issue with the record proposal
as it stands.
Right now the class
class Has (r :: *) (x :: Symbol) (t :: *)
can be viewed as morally equivalent to having several classes
class Foo a b where
foo :: a - b
class Bar a b where
bar
By the way, on the topic of these preformance comparisons -- has anyone
tried building the RTS with the Intel C compiler? (They try very hard at
being a drop-in GHC replacement.)
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
Err, GCC replacement. But, ironically, GHC [backend] replacement as well,
as of the recent ICFP paper.
On Mon, Jul 1, 2013 at 12:03 PM, Ryan Newton rrnew...@gmail.com wrote:
By the way, on the topic of these preformance comparisons -- has anyone
tried building the RTS with the Intel C
Hi Edward,
I was envisaging that we might well need a functional dependency
class Has (r :: *) (x :: Symbol) (t :: *) | r x - t
and, as you point out, composition of polymorphic accessors certainly
motivates this. Isn't that enough, though? I think it works out more
neatly than the type family
On Mon, Jul 1, 2013 at 1:07 PM, Adam Gundry adam.gun...@strath.ac.ukwrote:
Hi Edward,
I was envisaging that we might well need a functional dependency
class Has (r :: *) (x :: Symbol) (t :: *) | r x - t
and, as you point out, composition of polymorphic accessors certainly
motivates this.
10 matches
Mail list logo