Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anomaly when declaring canonical structures #23

Closed
peterlefanulumsdaine opened this issue Mar 10, 2013 · 1 comment
Closed

Anomaly when declaring canonical structures #23

peterlefanulumsdaine opened this issue Mar 10, 2013 · 1 comment
Assignees

Comments

@peterlefanulumsdaine
Copy link

(Working over b07e5d7, i.e. current stable branch.)

Declaring certain canonical structures fails, with “Anomaly: Mismatched instance and context when building universe substitution. Please report.” The smallest example I’ve found is:

Record Type_Over (X : Type) 
:= { Domain :> Type;
     proj : Domain -> X }.

Definition Self_Over (X : Type)
  := {| Domain := X; proj := (fun x => x) |}.

Canonical Structure Self_Over. (* fails *)

If Self_Over is changed to a monomorphic definition, then the Canonical Structure declaration still fails but with a different error: “Warning: No global reference exists for projection valuefun x : _UNBOUND_REL_1 => x in instance Self_Over of proj, ignoring it.”

As best as I can conjecture, this error seems to occur just when the record has a type parameter.

@ghost ghost assigned mattam82 Mar 11, 2013
@mattam82
Copy link
Member

mattam82 commented Apr 5, 2013

Fixed now.

@mattam82 mattam82 closed this as completed Apr 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants