Skip to content

WIP: Resolve "ReadResult should be less constrained"

Clean Importer requested to merge 353-readresult-should-be-less-constrained into master

Shared data sources are now parametrised by their children to allow relaxation in the class constraints. To achieve this I had to split up the SDSSource share in a read and write component. This change does make types relatively big, on the public interfaces these large types may be boxed in the SDS type, an existential type box.

What do you think?: @baslijns, @smichels, @cstaps, @eveen, @rinus, @johnvg

todo:

  • Parametrise all share types.
  • Relax the constraints on *Result types.
  • Update all example programs.
  • Make all read-only sources truly read only (e.g. randomInt).
  • Add SDS boxes to all publicly accessible sources that are too ugly (sharedStore, withShared, etc.).
  • Only require Registrable on viewSharedInformation and friends.
  • Clean up
  • Test
  • Test more
  • Benchmark
  • Optional: split up lenses in bijections and injections so that the constraints on the children can be even more relaxed.

N.B.: I'm not completely confident whether this is the way to go forward because it may make things slower (dictionaries become a lot bigger) (or maybe not (a lot less existentially quantified types)). Either way, I need this for my paper to strengthen my argument so even if we decide against it I won't be sad.

Closes #353

Edited by Clean Importer

Merge request reports