Skip to content

Inconsistent constraints leading to violated invariants in conversion checking #1467

Description

@GoogleCodeExporter
{-# OPTIONS --allow-unsolved-metas #-}

module Bug where

record _×_ (A B : Set) : Set where
  constructor _,_
  field
    proj₁ : A
    proj₂ : B

app : {A B C : Set} → (A → B) × A → B
app (f , x) = f x

postulate
  P   : {A : Set} → A → Set
  p   : {A B C : Set} (f : A → B → C) {y : A} {v : B} → P y → P (f y v)
  A   : Set
  foo : (F : Set → Set) → (A → F A) → F A
  bar : (F : Set → Set) (f : A → F A) → P (foo F f)

q : P (app (foo (λ _ → (A → A) × A) (λ x → (λ x → x) , x)))
q = p (λ f x → app (f , x)) (bar ? ?)

-- An internal error has occurred. Please report this as a bug.
-- Location of the error: src/full/Agda/TypeChecking/Conversion.hs:668

The error above is raised by Agda 2.4.2, as well as the current
maintenance and master branch versions. Agda 2.3.2.2 accepts the file.

Original issue reported on code.google.com by nils.anders.danielsson on 24 Mar 2015 at 7:34

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

constraintsConstraints (postponed type checking problems, postponed unification problems, instance constraints)conversionConversion checking for terms, types; Subtyping; Size solvingtype: bugIssues and pull requests about actual bugs

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions