batate / elixir-pipes

Macros for more flexible composition with the Elixir Pipe operator
Apache License 2.0
327 stars 26 forks source link

Warning: this clause cannot match because a previous clause at line X always matches #13

Open fourcube opened 8 years ago

fourcube commented 8 years ago

Thank you for this great library. I have one question:

pipe_matching x, {:ok, x},
      {:ok, source_dir}
      |> build
      |> tag(name, version)
      |> save(dest_dir)
      |> delete_image

leads to this compiler warning:

warning: this clause cannot match because a previous clause at line 1 always matches

Am I doing something wrong or do I simply have to live with this warning?

batate commented 8 years ago

Hm... this didn't happen with my previous examples. (That's the perfect use case, and exactly why I built it. :) )

-bt

On Fri, Dec 18, 2015 at 1:26 AM, Chris Grieger notifications@github.com wrote:

Thank you for this great library. I have one question:

pipe_matching x, {:ok, x}, {:ok, source_dir} |> build |> tag(name, version) |> save(dest_dir) |> delete_image

leads to this compiler warning:

warning: this clause cannot match because a previous clause at line 1 always matches

Am I doing something wrong or do I simply have to live with this warning?

— Reply to this email directly or view it on GitHub https://github.com/batate/elixir-pipes/issues/13.

Bruce Tate | CTO | 512.772.4312

_icanmakeitbetter_.com http://icanmakeitbetter.com

Innovation + Research. Made Simple