Why does compiling this code:

triples( [], _,_,_)->
  [];

triples( Self, X, Y, none )->
  [ Result || Result = { X, Y, _} <- Self ].

report:

./simple_graph.erl:63: Warning: variable 'X' is unused
./simple_graph.erl:63: Warning: variable 'Y' is unused
./simple_graph.erl:64: Warning: variable 'X' is unused
./simple_graph.erl:64: Warning: variable 'X' shadowed in generate
./simple_graph.erl:64: Warning: variable 'Y' is unused
./simple_graph.erl:64: Warning: variable 'Y' shadowed in generate

And return wrong result: full Self.

Edit
Report