Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make stack traces legible #6

Open
MasonProtter opened this issue Feb 21, 2019 · 0 comments
Open

Make stack traces legible #6

MasonProtter opened this issue Feb 21, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@MasonProtter
Copy link
Owner

MasonProtter commented Feb 21, 2019

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]:1

I 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.

@MasonProtter MasonProtter added the enhancement New feature or request label Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant