Skip to content
Snippets Groups Projects

Avoid universe bumps of `gset`/`mapset` (fixes #134)

Merged Robbert Krebbers requested to merge robbert/mapset_universe into master
All threads resolved!

I don't understand universes well enough to see why the previous version does not work. So if anyone can explain that, that would be great :).

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Otherwise, LGTM -- but I am puzzled why this works.^^

  • Robbert Krebbers resolved all threads

    resolved all threads

  • added 1 commit

    • 1a421790 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

    • Resolved by Robbert Krebbers

      I think I developed a little better sense why the previous approach does not work.

      Types like gmap Z have type Type@{u} → Type@{u} for any u, i.e., the map is at the same universe as the elements. Hence, gmap Z () would be Set.

      However, given mapset : (Type -> Type) -> Type, how could you put universe annotations to make sure that mapset (gmap K) will have type Set? I suppose something like mapset : (M : forall u, Type@{u} → Type@{u}) → Set might work, since M is applied to (), but such higher-ranked types cannot be expressed.

      With this MR we have mapset' : Type@{u} → Type@{u}, so then mapset' (gmap K ()) will have type Set.

  • Robbert Krebbers resolved all threads

    resolved all threads

  • mentioned in commit d5b53680

  • Please register or sign in to reply
    Loading