summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeb <peb@ling.gu.se>2008-11-17 13:33:53 +0000
committerpeb <peb@ling.gu.se>2008-11-17 13:33:53 +0000
commit7babe205e8f1c77afdc9a3c7cb7e859298999b42 (patch)
treef9e20e60517571722e8261e31e855bf0a1a1595b /src
parent5f2ab183ae97ba1bb055ae2592ee53ec8adba36c (diff)
Fix in Prolog output of the atom "'"
Diffstat (limited to 'src')
-rw-r--r--src/GF/Compile/GFCCtoProlog.hs2
1 files changed, 1 insertions, 1 deletions
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]