File 0002-Fix-reverting-of-implicit-funs.patch of Package erlang

From 290dc2b08a2f92157ac5358fba815f4dbb32f8f2 Mon Sep 17 00:00:00 2001
From: Anthony Ramine <n.oxyde@gmail.com>
Date: Sat, 18 May 2013 21:02:22 +0200
Subject: [PATCH] Fix reverting of implicit funs

Implicit funs parts in plain AST are no longer in concrete form since
Erlang/OTP R15.
---
 lib/syntax_tools/src/erl_syntax.erl | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl
index bdb2b5b..409805e 100644
--- a/lib/syntax_tools/src/erl_syntax.erl
+++ b/lib/syntax_tools/src/erl_syntax.erl
@@ -5485,22 +5485,15 @@ revert_implicit_fun(Node) ->
 	arity_qualifier ->
 	    F = arity_qualifier_body(Name),
 	    A = arity_qualifier_argument(Name),
-	    case {type(F), type(A)} of
-		{atom, integer} ->
-		    {'fun', Pos,
-		     {function, concrete(F), concrete(A)}};
-		_ ->
-		    Node
-	    end;
+	    {'fun', Pos, {function, F, A}};
 	module_qualifier ->
 	    M = module_qualifier_argument(Name),
 	    Name1 = module_qualifier_body(Name),
-	    F = arity_qualifier_body(Name1),
-	    A = arity_qualifier_argument(Name1),
-	    case {type(M), type(F), type(A)} of
-		{atom, atom, integer} ->
-		    {'fun', Pos,
-		     {function, concrete(M), concrete(F), concrete(A)}};
+	    case type(Name1) of
+		arity_qualifier ->
+		    F = arity_qualifier_body(Name1),
+		    A = arity_qualifier_argument(Name1),
+		    {'fun', Pos, {function, M, F, A}};
 		_ ->
 		    Node
 	    end;
-- 
2.1.4