[Haskell-cafe] Some thoughts on Type-Directed Name

Simon Peyton-Jones simonpj at microsoft.com
Mon Jan 30 18:00:01 CET 2012


|  What would really, really help me is for someone to have a look at the 'solution' I
|  posted to the difficulties SPJ saw with the SORF approach. (I ref'd it in my reply to

In response to your plea, I took a look at your post
  http://www.haskell.org/pipermail/glasgow-haskell-users/2011-December/021298.html

Some thoughts

* I don't think you need GetTy at all.  The attached version of your
  code gets rid of it.

* Your trick with SetrTy does, I think, support type-changing update.
  Good.  (Whether type-changing update is itself a valuable
  enough feature to be worth the extra complexity, I'm not certain, 
  but perhaps that's a separate matter.)

* Your trick with SetTy to support update of polymorphic fields is, I
  belive, an (ingenious) hack that does not scale. I think it works
  only for fields that are quantified over one type variable with no
  constraints.

So, I think that update of polymorphic fields remains problematic.

Simon

|  -----Original Message-----
|  From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-
|  bounces at haskell.org] On Behalf Of Anthony Clayden
|  Sent: 28 January 2012 09:25
|  To: Greg Weber; Steve Horne; Haskell Cafe
|  Cc: glasgow-haskell-users at haskell.org
|  Subject: Re: [Haskell-cafe] Some thoughts on Type-Directed Name
|  
|  > There is an effort underway to make Haskell's Records better. The
|  > discussion is ongoing on the ghc-users mail list, ...
|  > in the direction of making the most minimal changes possible to
|  > achieve some simple record name-spacing.
|  >
|  > Thanks,
|  > Greg Weber
|  
|  Thank you Greg,
|  
|  Yes I know, and I have been trying to follow along (intermittently). Thank you for
|  your attempts to marshall the discussion.
|  
|  What would really, really help me is for someone to have a look at the 'solution' I
|  posted to the difficulties SPJ saw with the SORF approach. (I ref'd it in my reply to
|  Steve.)
|  http://www.haskell.org/pipermail/glasgow-haskell-users/2011-
|  December/021298.html
|  
|  It seemed from my testing to address the needs. Since I got it working in GHC
|  7.2.1, there's a good chance it will need only "minimal changes" to implement
|  (I'm thinking mostly syntactic sugar) -- providing of course that it is workable and
|  generalisable enough.
|  
|  It could possibly benefit from some of the new Kind-level stuff in 7.4.1 (that SPJ
|  used, but wasn't available to me at the time).
|  
|  I keep trying to make the time to write up the full proposal on the Wiki. I see it as
|  a 'tweak' to SORF. Given that I'm supposed to have a day job, I'm reluctant to
|  make time until/unless someone else double-checks whether I'm barking up the
|  wrong tree.
|  
|  Anthony
|  
|  
|  
|  
|  _______________________________________________
|  Glasgow-haskell-users mailing list
|  Glasgow-haskell-users at haskell.org
|  http://www.haskell.org/mailman/listinfo/glasgow-haskell-users





More information about the Glasgow-haskell-users mailing list