[Haskell-beginners] Basic Parsec question

Zachary Turner divisortheory at gmail.com
Wed Apr 1 00:16:57 EDT 2009


Hi,

I downloaded the package lispparser to, well, parse lisp code.  I really
have absolutely no idea what I'm doing though.  I can look at the source of
the module and see that it's exporting a single data type called LispVal and
a single function called parseExpr, so somehow I should be able to pass an
arbitrary block of lisp code into this function and get back a LispVal.  But
for the life of me I can't figure out how.  I've looked at the documentation
but I get even more confused because it links me to the Parsec documentation
which is probably way over my head.  Basically I just want a simple
function:

parse :: String -> LispVal
parse expr = ???

presumably by making some use of the exported 'thing' (since I'm not really
sure how to interpret its type)

parseExpr :: Parser LispVal

Thanks for any help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090331/3f884cb0/attachment.htm


More information about the Beginners mailing list