This commit is contained in:
parent
cf527e05bd
commit
8d8c73416a
1 changed files with 13 additions and 0 deletions
13
tests/lean/run/2602.lean
Normal file
13
tests/lean/run/2602.lean
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
inductive Units : Bool → Type where
|
||||
| seconds : Units false
|
||||
| hours : Units true
|
||||
|
||||
open Units
|
||||
|
||||
structure Quantity (d : Bool) : Type where
|
||||
quantity : Unit
|
||||
units : Units d
|
||||
|
||||
instance (d : Bool) : ToString (Quantity d) where
|
||||
toString q := match q.units with | seconds => "seconds" | hours => "hours"
|
||||
|
||||
Loading…
Add table
Reference in a new issue