File tree Expand file tree Collapse file tree 7 files changed +7
-7
lines changed
Expand file tree Collapse file tree 7 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -685,7 +685,7 @@ def get (t : DTreeMap α β cmp) (a : α) (h : a ∈ t) : β :=
685685 letI : Ord α := ⟨cmp⟩; Impl.Const.get t.inner a h
686686
687687@[inline, inherit_doc DTreeMap.get!]
688- def get ! (t : DTreeMap α β cmp) (a : α) [Inhabited β] : β :=
688+ def get ! [Inhabited β] (t : DTreeMap α β cmp) (a : α) : β :=
689689 letI : Ord α := ⟨cmp⟩; Impl.Const.get! t.inner a
690690
691691@[inline, inherit_doc DTreeMap.getD]
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ def get [Ord α] (t : Impl α δ) (k : α) (hlk : t.contains k = true) : δ :=
216216 | .eq => v'
217217
218218/-- Returns the value for the key `k`, or panics if such a key does not exist. -/
219- def get! [Ord α] (t : Impl α δ) (k : α) [Inhabited δ] : δ :=
219+ def get! [Ord α] [Inhabited δ] (t : Impl α δ) (k : α) : δ :=
220220 match t with
221221 | .leaf => panic! "Key is not present in map"
222222 | .inner _ k' v' l r =>
Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ def get (t : Raw α β cmp) (a : α) (h : a ∈ t) : β :=
433433 letI : Ord α := ⟨cmp⟩; Impl.Const.get t.inner a h
434434
435435@[inline, inherit_doc DTreeMap.Const.get!]
436- def get ! (t : Raw α β cmp) (a : α) [Inhabited β] : β :=
436+ def get ! [Inhabited β] (t : Raw α β cmp) (a : α) : β :=
437437 letI : Ord α := ⟨cmp⟩; Impl.Const.get! t.inner a
438438
439439@[inline, inherit_doc DTreeMap.Const.getD]
Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ def get [TransCmp cmp] (t : ExtDTreeMap α β cmp) (a : α) (h : a ∈ t) : β :
521521 (fun _ _ _ _ h => h.constGet_eq)
522522
523523@[inline, inherit_doc ExtDTreeMap.get!]
524- def get ! [TransCmp cmp] (t : ExtDTreeMap α β cmp) (a : α) [Inhabited β] : β :=
524+ def get ! [TransCmp cmp] [Inhabited β] (t : ExtDTreeMap α β cmp) (a : α) : β :=
525525 t.lift (fun m => DTreeMap.Const.get! m a)
526526 (fun _ _ h => h.constGet!_eq)
527527
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ def get [TransCmp cmp] (t : ExtTreeMap α β cmp) (a : α) (h : a ∈ t) : β :=
152152 ExtDTreeMap.Const.get t.inner a h
153153
154154@[inline, inherit_doc ExtDTreeMap.Const.get!]
155- def get ! [TransCmp cmp] (t : ExtTreeMap α β cmp) (a : α) [Inhabited β] : β :=
155+ def get ! [TransCmp cmp] [Inhabited β] (t : ExtTreeMap α β cmp) (a : α) : β :=
156156 ExtDTreeMap.Const.get! t.inner a
157157
158158@[inline, inherit_doc ExtDTreeMap.Const.getD]
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ def get (t : TreeMap α β cmp) (a : α) (h : a ∈ t) : β :=
155155 DTreeMap.Const.get t.inner a h
156156
157157@[inline, inherit_doc DTreeMap.Const.get!]
158- def get ! (t : TreeMap α β cmp) (a : α) [Inhabited β] : β :=
158+ def get ! [Inhabited β] (t : TreeMap α β cmp) (a : α) : β :=
159159 DTreeMap.Const.get! t.inner a
160160
161161@[inline, inherit_doc DTreeMap.Const.getD]
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ def get (t : Raw α β cmp) (a : α) (h : a ∈ t) : β :=
167167 DTreeMap.Raw.Const.get t.inner a h
168168
169169@[inline, inherit_doc DTreeMap.Raw.Const.get!]
170- def get ! (t : Raw α β cmp) (a : α) [Inhabited β] : β :=
170+ def get ! [Inhabited β] (t : Raw α β cmp) (a : α) : β :=
171171 DTreeMap.Raw.Const.get! t.inner a
172172
173173@[inline, inherit_doc DTreeMap.Raw.Const.getD]
You can’t perform that action at this time.
0 commit comments