Skip to content

Instantly share code, notes, and snippets.

@wires
Created November 11, 2011 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wires/1358259 to your computer and use it in GitHub Desktop.
Save wires/1358259 to your computer and use it in GitHub Desktop.
Require Import canonical_names.
Class Foo A := foo: A → A.
Instance kaas0 X : Foo X := @id X.
(* kaas0 = λ X : Type, id
: ∀ X : Type, Foo X
Argument scope is [type_scope] *)
Instance kaas1 : ∀ X, Foo X := λ X, @id X.
(* kaas1 = λ X : Type, id
: ∀ X : Type, Foo X
Argument scope is [type_scope] *)
Instance kaas2 : Foo X := fun X => @id X.
(* kaas2 = λ X : Type, id
: ∀ X : Type, Foo X
Argument X is implicit and maximally inserted
Argument scope is [type_scope] *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment