From fae330f733a597d0c4a31d8a47b8f166706684ac Mon Sep 17 00:00:00 2001 From: peb Date: Mon, 17 Nov 2008 13:33:53 +0000 Subject: [PATCH] Fix in Prolog output of the atom "'" --- src/GF/Compile/GFCCtoProlog.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GF/Compile/GFCCtoProlog.hs b/src/GF/Compile/GFCCtoProlog.hs index 50cbb3312..4e1ccfba6 100644 --- a/src/GF/Compile/GFCCtoProlog.hs +++ b/src/GF/Compile/GFCCtoProlog.hs @@ -207,7 +207,7 @@ plVar = varPrefix . concatMap changeNonAlphaNum plAtom :: String -> String plAtom "" = "''" plAtom atom@(c:cs) | isAsciiLower c && all isAlphaNumUnderscore cs - || c == '\'' && last cs == '\'' = atom + || c == '\'' && cs /= "" && last cs == '\'' = atom | otherwise = "'" ++ concatMap changeQuote atom ++ "'" where changeQuote '\'' = "\\'" changeQuote c = [c]