Contenu connexe
Similaire à Purescript with Monad (20)
Purescript with Monad
- 8. 具体例1. Parser
parse :: Parser a -> String -> Either Errors a
type Parser a = String -> [(a, String)]
--This is a naive definition of parsers.
- 9. 具体例2. WAI
-- WAI = Web Application Interface
run :: Port -> Application -> IO ()
type Application = Request -> IO Response