From: Samir Benmendil Date: Sat, 13 Jan 2018 22:41:38 +0000 (+0000) Subject: Define a parser for various symbols in Scheme X-Git-Url: https://git.rmz.io/my-scheme.git/commitdiff_plain/f842fb4a461de09bae23b67773611ba08cd21885?ds=sidebyside Define a parser for various symbols in Scheme `symbol :: Parser Char` is probably not needed (?) I don't understand where the `Parser` type comes from, I cannot see it in the doc of `Text.ParserCombinators.Parsec`. It may be that `ParserCombinators` is a compatibility layer and that `Parser` is defined somewhere else. `oneOf` is provided by Parsec. --- diff --git a/app/Main.hs b/app/Main.hs index 2740935..015db3a 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -2,6 +2,9 @@ module Main where import Text.ParserCombinators.Parsec import System.Environment +symbol :: Parser Char +symbol = oneOf "!#$%&|*+-/:<=>?@^_~" + main :: IO () main = do args <- getLine