Compile.hs returns json for compile errors