-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, if you encounter an error in a LegibleLambda, the printing in the stacktrace is still not legible:
julia> using LegibleLambdas
julia> g = @λ x -> x + 1
(x -> x + 1)
julia> g("hi")
ERROR: MethodError: no method matching +(::String, ::Int64)
Closest candidates are:
+(::Any, ::Any, ::Any, ::Any...) at operators.jl:560
+(::T, ::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} at int.jl:87
+(::UniformScaling, ::Number) at /Users/mason/julia/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/uniformscaling.jl:145
...
Stacktrace:
[1] (::var"#1#2")(x::String)
@ Main ./REPL[2]:1
[2] (::LegibleLambda{var"#1#2"})(args::String)
@ LegibleLambdas ~/.julia/packages/LegibleLambdas/wGhDT/src/LegibleLambdas.jl:44
[3] top-level scope
@ REPL[3]:1I guess what is needed would be to improve the printing of typeof(::LegibleLambda) which means that we'd have to store the requisite printing information in the struct itself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request