From 3582ae6e085fcc2cfa2e0457c5674e22c5980fa5 Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 3 Oct 2012 13:22:50 +0000 Subject: gfse: some refactoring --- src/compiler/SimpleEditor/Convert.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/compiler/SimpleEditor/Convert.hs') diff --git a/src/compiler/SimpleEditor/Convert.hs b/src/compiler/SimpleEditor/Convert.hs index e2fc20358..e6cb98124 100644 --- a/src/compiler/SimpleEditor/Convert.hs +++ b/src/compiler/SimpleEditor/Convert.hs @@ -24,14 +24,13 @@ import SimpleEditor.JSON parseModule (path,source) = - prop path $ + (path.=) $ case runP pModDef (BS.pack source) of Left (Pn l c,msg) -> - makeObj [prop "error" msg, - prop "location" (show l++":"++show c)] + makeObj ["error".=msg, "location".= show l++":"++show c] Right mod -> case convModule mod of - Ok g -> makeObj [prop "converted" g] - Bad msg -> makeObj [prop "parsed" msg] + Ok g -> makeObj ["converted".=g] + Bad msg -> makeObj ["parsed".=msg] {- convAbstractFile path = -- cgit v1.2.3