blob: c1d11599abaf294d5ff8988e3197e8aa2e5ae5fa [file]
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"