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
Constraint solving in heterogenous situations #470
Comments
What's needed here is the heterogenous shape machinery we just implemented for unification. Original comment by
|
Original comment by
|
Has this been implemented? The code typechecks with no unsolved metas on the dev. version of Agda. Original comment by |
No, this has not been implemented. However, the occurs check was strengthened. Also, this might be working due to bug #1258. Original comment by |
This is a better test case then: module Solve where
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
refl : x ≡ x
data Bool : Set where
true false : Bool
_and_ : Bool → Bool → Bool
true and x = x
false and x = false
infixr 5 _∷_
data Foo : Bool → Set where
[] : Foo true
_∷_ : ∀ {b} (x : Bool) → Foo b → Foo (x and b)
foo : let C = _ in (C ∷ []) ≡ (false ∷ [])
foo = refl
Original comment by |
For the new example I get:
Could the proposal be fleshed out to see what it takes to implement this? |
The test case given in #470 (comment) seems to type-check at least since commit ba4354f. |
Can you please add it to the test suite? |
Here, the solver's equation 75 is blocked by 76, but 76 can't be solved in isolation, so things turn yellow. However, if the solver ignored 76 and unified _53 with false, then it could solve 76. Ulf and I spoke about it on
IRC and he said it might be possible to have the solver first check that the "shape" of things being unified in 75 could be checked to make sure the unification makes sense, then they could be unified, then 76 could be attempted.
Original issue reported on code.google.com by
pumpkingod@gmail.com
on 22 Sep 2011 at 3:33The text was updated successfully, but these errors were encountered: