You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
boldP : Parser (List Char)
boldP = do
_ <- ntimes 2 (char '*')
txt <- some (alphaNum <|> char ' ')
_ <- ntimes 2 (char '*')
pure $ unpack "<strong>" ++ txt ++ unpack "</strong>"
foo : Either String (List Char)
foo = parse boldP "**idris is cool**"
But it seems to fail to do anything.
Expression: foo = case case uncons "idris is cool**" of
Nothing => ue [Err pos "a token, not EOF"] (ST i pos tw)
Just (t, rest) => case f t of
Nothing => ue [Err pos "a different token"] (ST i pos tw)
Just res => case updatePos tw pos t of
(newPos, b) => us res (ST rest newPos tw) of
Id r => case r of
MkReply _ (Success x) => Right x
MkReply _ (Failure es) => Left (concat (intersperse "\n" (map display es))) : Either String (List Char)
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to translate the last megaparsec example on this page.
http://akashagrawal.me/beginners-guide-to-megaparsec/
I ended up with this, which typechecks.
But it seems to fail to do anything.
The text was updated successfully, but these errors were encountered: