diff --git a/src/Main.purs b/src/Main.purs index 25b58df..1b828aa 100644 --- a/src/Main.purs +++ b/src/Main.purs @@ -4,40 +4,11 @@ import Parser (Parser(..)) import DomainParser (domain, label, ldh_str, sub_eof, subdomain, DomainError(..)) import Prelude (Unit, discard, show, ($), (<>)) - -import Effect (Effect) -import Effect.Console (log) - import Data.Either (Either(..)) import Data.Maybe (Maybe(..)) ---import Data.Tuple (Tuple(..)) - import Data.String.CodeUnits (fromCharArray) - --- isf :: Parser Boolean --- isf = (_ == 'f') <$> itemP --- --- isf2 :: Parser Boolean --- isf2 = (==) <$> itemP <*> pure 'f' --- --- isf3 :: Parser Boolean --- isf3 = charP 'f' --- --- ishi :: Parser (Tuple Boolean Boolean) --- ishi = Tuple <$> ((_ == 'h') <$> itemP) <*> ((_ == 'i') <$> itemP) --- --- ishi2 :: Parser (Tuple Boolean Boolean) --- ishi2 = ado --- h <- itemP --- i <- itemP --- in Tuple (h == 'h') (i == 'i') --- --- isffound :: Maybe (Tuple Boolean String) -> Effect Unit --- isffound maybe = case maybe of --- Nothing -> log "no more data" --- Just (Tuple b str) -> do --- let toprint = if b then "FOUND IT" else "not found" --- log $ toprint <> ", rest: " <> str +import Effect.Console (log) +import Effect (Effect) logtest :: forall e v. String -> Parser e v -> String -> (v -> String) -> (e -> String) -> Effect Unit logtest fname (Parser p) str r e = do