Fix in Prolog output of the atom "'"
This commit is contained in:
1 parent
5f2ab183ae
commit
7babe205e8
1 file changed
+1
-1
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user