diff --git a/src/compiler/GF/Compile/Compute/Concrete.hs b/src/compiler/GF/Compile/Compute/Concrete.hs index e59fac1b3..3c8fa2a69 100644 --- a/src/compiler/GF/Compile/Compute/Concrete.hs +++ b/src/compiler/GF/Compile/Compute/Concrete.hs @@ -120,9 +120,7 @@ eval env (Vr x) vs = case lookup x env of eval env (Sort s) [] = return (VSort s) eval env (EInt n) [] = return (VInt n) eval env (EFloat d) [] = return (VFlt d) -eval env (K t) [] - | null t = return (VC []) - | otherwise = return (VStr t) +eval env (K t) [] = return (VStr t) eval env Empty [] = return (VC []) eval env (App t1 t2) vs = do tnk <- newThunk env t2 eval env t1 (tnk : vs) diff --git a/src/compiler/GF/Compile/TypeCheck/Concrete.hs b/src/compiler/GF/Compile/TypeCheck/Concrete.hs index 066fec127..6441ee516 100644 --- a/src/compiler/GF/Compile/TypeCheck/Concrete.hs +++ b/src/compiler/GF/Compile/TypeCheck/Concrete.hs @@ -180,15 +180,12 @@ inferLType gr g trm = case trm of -- return (trm, Table arg val) -- old, caused issue 68 checkLType gr g trm (Table arg val) - K s -> do - if elem ' ' s - then do - let ss = foldr C Empty (map K (words s)) - ----- removed irritating warning AR 24/5/2008 - ----- checkWarn ("token \"" ++ s ++ - ----- "\" converted to token list" ++ prt ss) - return (ss, typeStr) - else return (trm, typeStr) + K s -> + let trm' = case words s of + [] -> Empty + [w] -> K w + ws -> foldr C Empty (map K ws) + in return (trm', typeStr) EInt i -> return (trm, typeInt)