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

matching problem with v0.7 #59

Open
Qiyamah opened this issue Apr 17, 2018 · 1 comment
Open

matching problem with v0.7 #59

Qiyamah opened this issue Apr 17, 2018 · 1 comment

Comments

@Qiyamah
Copy link

Qiyamah commented Apr 17, 2018

Here is what happens with V06

julia> using  ExpressionPatterns.Matching

julia> using  ExpressionPatterns.Helper

julia> using  Base.Meta

julia> match = matcher(:(@m :x y))
(::match!) (generic function with 2 methods)

julia> match(:(@transport :car   (john, peter)))
true

and here is what happens with v0.7

julia> using  ExpressionPatterns.Matching

julia> using  ExpressionPatterns.Helper

julia> using  Base.Test
WARNING: Base.Test is deprecated, run `using Test` instead
 in module Base

julia> using  Base.Meta

julia> match = matcher(:(@m :x y))
┌ Warning: `current_module()` is deprecated, use `@__MODULE__` instead.
│   caller = matcher(::Expr) at Function.jl:12
└ @ ExpressionPatterns.Matching.Function Function.jl:12
┌ Warning: `find(f::Function, A::AbstractVector)` is deprecated, use `findall(f, A)` instead.
│   caller = optimize_slurps!(::ExpressionPatterns.PatternStructure.Trees.PatternNode, ::ExpressionPatterns.Analyzer.Function.AnalysisState) at SlurpOptimizations.jl:13
└ @ ExpressionPatterns.Analyzer.SlurpOptimizations SlurpOptimizations.jl:13
(::getfield(ExpressionPatterns.Matching.Function, Symbol("#match!#1")){ExpressionPatterns.PatternStructure.Trees.PatternNode}) (generic function with 2 methods)

julia> match(:(@transport :car   (john, peter)))
┌ Warning: `endof(a)` is deprecated, use `lastindex(a)` instead.
│   caller = match_children(::ExpressionPatterns.PatternStructure.Trees.PatternNode, ::Array{Any,1}, ::Int64, ::Int64, ::Any) at Function.jl:76
└ @ ExpressionPatterns.Matching.Function Function.jl:76
false

Thanks

@fcard
Copy link
Owner

fcard commented May 18, 2018

Works on my end with the master branch. Try using this on 0.7 for now:

import Pkg: checkout
checkout("ExpressionPatterns")

I also am taking a look at other the issues, hopefully I can update the package on the official repository soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants