Overloaded record fields: we ought to change the name of FldTy
adam at well-typed.com
Wed Apr 30 15:22:46 UTC 2014
On 30/04/14 09:33, Johan Tibell wrote:
> I'm currently watching the Skills Matter talks you gave (great!) and I'm
> slightly worried that we're going to expose beginners (and intermediate
> users!) to a name called FldTy, which might be OK for a GHC-internal
> name, but is not very readable.
> If this is going to be exposed to users, could we name is something
> readable, like FieldType, Field, or something similar?
While I'm hoping to avoid exposing these names to most users more than
at present, I think you're right: we should pick slightly more
informative names. (Various others have also made this suggestion!) Perhaps:
Has |-> HasField
FldTy |-> FieldType
Upd |-> UpdatedField
UpdTy |-> UpdatedType
If possible, I'd prefer to merge the existing patches more or less as
is, then I can work on the library design without continually needing to
fix merge conflicts.
Apart from naming, I'd like to tweak the design to improve the
presentation of inferred types that result from ORF code. Since I
originally implemented it, the constraint solver seems to have changed
in a way that makes the "functional dependencies via type families"
approach used lead to less pretty types. Obviously we need something a
little less brittle.
Adam Gundry, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/
More information about the ghc-devs