Changes between Version 16 and Version 17 of Records/DeclaredOverloadedRecordFields/ImplementorsView


Ignore:
Timestamp:
Mar 1, 2012 7:29:49 AM (2 years ago)
Author:
AntC
Comment:

Discuss exporting Proxy_type

Legend:

Unmodified
Added
Removed
Modified
  • Records/DeclaredOverloadedRecordFields/ImplementorsView

    v16 v17  
    248248=== Representation hiding/import/export === 
    249249 
    250 See the discussion under [wiki:Records/DeclaredOverloadedRecordFields#ImportExportandRepresentationhiding Application Programmer's view Import/Export]  and [wiki:Records/DeclaredOverloadedRecordFields/NoMonoRecordFields No Mono Record Fields]. When import/exporting do we need to also export the Proxy_type? If not exported, update syntax cannot be desugarred to use it.) 
     250See the discussion under [wiki:Records/DeclaredOverloadedRecordFields#ImportExportandRepresentationhiding Application Programmer's view Import/Export]  and [wiki:Records/DeclaredOverloadedRecordFields/NoMonoRecordFields No Mono Record Fields].  
     251 
     252    [The following re the Proxy_type changed/added 1st March.] 
     253 
     254When import/exporting we need to separately control exporting the Proxy_type: 
     255 * If not exported, update syntax cannot be desugarred to use it, so this hides the representation. 
     256     (So any records become in effect read-only, using the exported field selector function.) 
     257 * Furthermore, it prevents the client declaring records to 'share' the fieldLabel. 
     258     (Because the `Has` instance generated will try to use the Proxy_type.) 
     259Drat! I was trying to keep the Proxy_type hidden from the programmer. 
     260 
     261It's possible we might want to prevent the latter, but allow the former?? 
     262 
     263    [Using a `String Kind` a la SORF would not help: can't control sharing nor hide the representation.[[BR]] End of Proxy_type addition.] 
    251264 
    252265See also the attached `DORF Prototype Importing 29Feb2012.lhs`, which selectively imports some fieldLabels, and declares local versions of others. This shows that within a single record decl: