products/sources/formale sprachen/Coq/test-suite/bugs/closed image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: script.js   Sprache: Coq

Original von: Coq©

Set Implicit Arguments.
Set Universe Polymorphism.

Module success.
  Unset Primitive Projections.

  Record group :=
    { carrier : Type;
      id : carrier }.

  Notation "1" := (id _) : g_scope.

  Delimit Scope g_scope with g.
  Bind Scope g_scope with carrier.

  Section foo.
    Variable g : group.
    Variable comp : carrier g -> carrier g -> carrier g.

    Check comp 1 1.
  End foo.
End success.

Module failure.
  Set Primitive Projections.

  Record group :=
    { carrier : Type;
      id : carrier }.

  Notation "1" := (id _) : g_scope.

  Delimit Scope g_scope with g.
  Bind Scope g_scope with carrier.

  Section foo.
    Variable g : group.
    Variable comp : carrier g -> carrier g -> carrier g.

    Check comp 1 1.
    (* Toplevel input, characters 11-12:
Error:
In environment
g : group
comp : carrier g -> carrier g -> carrier g
The term "1" has type "nat" while it is expected to have type "carrier g".
    *)

  End foo.
End failure.

¤ Dauer der Verarbeitung: 0.18 Sekunden  (vorverarbeitet)  ¤





Download des
Quellennavigators
Download des
sprechenden Kalenders

in der Quellcodebibliothek suchen




Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.


Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff