Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  TacticCheckInstancesSimps.lean   Sprache: Lean

 

module

public import Mathlib.Tactic.Simps

@[expose] public section

set_option linter.tacticCheckInstances true

/-!
# Tests for the `tacticCheckInstances` linter on `@[simps]` projections
-/


/-! ## clean projection, no warning expected -/

structure Wrap (α : Type) where
  carrier : List α

#guard_msgs in
@[simps]
def mkWrap (s : List Nat) : Wrap Nat := { carrier := s }

/-! a semireducible alias `.implicit`-ill-typed equation. -/

structure Fn where
  toFun : Nat → Nat

def MyFn : Type := Fn

/--
warning: generated lemma idFn_toFun is not type-correct at `.implicit` transparency; consider marking some of the following as `@[implicit_reducible]`:
  MyFn

Note: This linter can be disabled with `set_option linter.tacticCheckInstances false`
-/

#guard_msgs in
@[simps]
def idFn : MyFn := ({ toFun := id } : Fn)

/-! marking the offender `@[implicit_reducible]` silences the warning -/

set_option allowUnsafeReducibility true
attribute [implicit_reducible] MyFn

#guard_msgs in
@[simps]
def idFn2 : MyFn := ({ toFun := id } : Fn)

Messung
CHZG
869810094

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,068
#Domains=861,802