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

Record projections disambiguator gets confused with non-trivial types #3167

Open
0xd34df00d opened this issue Dec 17, 2023 · 0 comments
Open
Labels

Comments

@0xd34df00d
Copy link
Contributor

0xd34df00d commented Dec 17, 2023

Steps to Reproduce

Try typechecking

module Foo

%default total
%prefix_record_projections off

data NameKind = Name

NameTy : NameKind -> Type
NameTy Name = String

record Person where
  name : String

record Dept nk where
  name : NameTy nk

foo : Dept Name -> String -> Bool
foo d name = d.name == name

gist

Expected Behavior

Typechecks successfully — just as it does if Dept is de-NameKind-ized or if Person is removed.

Observed Behavior

Error: While processing right hand side of foo. When unifying:
    Dept Name
and:
    Person
Mismatch between: Dept Name and Person.

Foo:18:14--18:15
 14 | record Dept nk where
 15 |   name : NameTy nk
 16 | 
 17 | foo : Dept Name -> String -> Bool
 18 | foo d name = d.name == name
                   ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants