pEol
return (Paragraph)
-
pSpace = do
space
return (Text " ")
s <- pStopAt s
return (f s)
-pStopAt xs = do
- try (string xs >> return []) <|> (do
- s <- pMain
- ss <- pStopAt xs
- return (s:ss))
-
-pString xs = do
- try (string xs >> return []) <|> (do
- s <- anyChar
- ss <- pString xs
- return (s:ss))
+pStopAt xs = pUntil pMain xs
+pString xs = pUntil anyChar xs
+pUntil p xs = manyTill p (try $ string xs)
pHeading = do
many1 pEol
return (Text (c:[]))
pText = do
- t <- many1 alphaNum--(noneOf ['\n','\r','[',']'])
+ t <- many1 alphaNum
return (Text t)
-
newtype PGB = PGB DBService
createPGB :: String -> String -> String -> String -> IO PGB
createPGB host database user password = let db = createDBService host database "" user password Nothing in return (PGB db)
-
-testDB = createPGB "wave" "wiki" "wiki" "12wiki34db"
-
instance Backend PGB where
getCurrent (PGB db) key = do