mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
correct Inspect custom impl to use Inspect.apply
This commit is contained in:
parent
4c25c60cdc
commit
5e36395369
3 changed files with 147 additions and 161 deletions
|
@ -1,4 +1,4 @@
|
|||
app "test" provides [main] to "./platform"
|
||||
|
||||
main = Inspect.toInspector { a: "" } |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
|
||||
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): Bool -[[Inspect.dbgBool(43)]]-> Inspector DbgFormatter
|
||||
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): { a : Str } -[[#Derived.toInspector_{a}(0)]]-> Inspector DbgFormatter
|
||||
|
|
|
@ -6,4 +6,4 @@ myToInspector : Op -> Inspector f where f implements InspectFormatter
|
|||
myToInspector = \@Op num -> Inspect.u8 num
|
||||
|
||||
main = Inspect.toInspector { op: @Op 1u8 } |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
|
||||
# ^^^^^^^^^^^^^^^^^^^ Op#Inspect.toInspector(2): Op -[[myToInspector(2)]]-> Inspector f where f implements InspectFormatter
|
||||
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): { op : Op } -[[#Derived.toInspector_{op}(0)]]-> Inspector DbgFormatter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue