correct Inspect custom impl to use Inspect.apply

This commit is contained in:
Brendan Hansknecht 2023-11-28 10:52:17 -08:00
parent 4c25c60cdc
commit 5e36395369
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
3 changed files with 147 additions and 161 deletions

View file

@ -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

View file

@ -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