GF.Compile.Coding: cleaner code

Refine function codeTerm into codeTerm, codeLTerm and codeLTerms.
This commit is contained in:
hallgren
2011-08-31 13:55:49 +00:00
parent 03b8c43bc8
commit 117fe7ad70
2 changed files with 12 additions and 7 deletions

View File

@@ -176,7 +176,7 @@ execute1 opts gfenv0 s0 =
case runP pExp (encodeUnicode utf8 s) of
Left (_,msg) -> putStrLn msg
Right t -> case checkComputeTerm sgr (unLoc (codeTerm (decodeUnicode utf8 . BS.pack) (L (0,0) t))) of
Right t -> case checkComputeTerm sgr (codeTerm (decodeUnicode utf8 . BS.pack) t) of
Ok x -> putStrLn $ showTerm sgr style q x
Bad s -> putStrLn $ s
continue gfenv