We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5192c7 commit d9f4a44Copy full SHA for d9f4a44
src/tangent_types/thunks.jl
@@ -194,7 +194,11 @@ end
194
195
@inline unthunk(x::Thunk) = x.f()
196
197
-Base.show(io::IO, x::Thunk) = print(io, "Thunk($(repr(x.f)))")
+function Base.show(io::IO, x::Thunk)
198
+ print(io, "Thunk(")
199
+ show(io, x.f)
200
+ print(io, ")")
201
+end
202
203
Base.convert(::Type{<:Thunk}, a::AbstractZero) = @thunk(a)
204
@@ -218,5 +222,9 @@ end
218
222
unthunk(x::InplaceableThunk) = unthunk(x.val)
219
223
220
224
function Base.show(io::IO, x::InplaceableThunk)
221
- return print(io, "InplaceableThunk($(repr(x.val)), $(repr(x.add!)))")
225
+ print(io, "InplaceableThunk(")
226
+ show(io, x.add!)
227
+ print(io, ", ")
228
+ show(io, x.val)
229
230
end
0 commit comments