I believe your output is not exactly AST, but some normalized form of AST.
{ok, Forms} = epp:parse_file("mix1.erl",[],[]).
{ok,[{attribute,1,file,{"mix1.erl",1}},
{attribute,1,module,mix1},
{attribute,2,export,[{square,1}]},
{attribute,3,spec,
{{square,1},
[{type,3,'fun',
[{type,3,product,[{type,3,number,[]}]},
{type,3,number,[]}]}]}},
{function,4,square,1,
[{clause,4,
[{var,4,'X'}],
[],
[{op,4,'*',{var,4,'X'},{var,4,'X'}}]}]},
{eof,6}]}