From: Mart Lubbers Date: Mon, 29 Feb 2016 14:01:50 +0000 (+0100) Subject: update nu geen output in prj file X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=db22521b4ba8a77e3bf845e38de3c0cb6e40a180;p=cc1516.git update nu geen output in prj file --- diff --git a/src/main.prj b/src/main.prj index f7fe0c7..09ebcb5 100644 --- a/src/main.prj +++ b/src/main.prj @@ -24,7 +24,7 @@ Global Time: True Stack: True Output - Output: ShowConstructors + Output: NoConsole Font: Courier FontSize: 9 WriteStdErr: False diff --git a/src/parse.icl b/src/parse.icl index fc6e740..349c0e1 100644 --- a/src/parse.icl +++ b/src/parse.icl @@ -150,8 +150,7 @@ parseVarDef = liftM2 VarDef (parseIdent >>= \i.if (i == "snd") (pure FieldSnd) empty)))) parseOp1 :: Parser Token Op1 -parseOp1 = trans1 DashToken UnMinus <|> - trans1 ExclamationToken UnNegation +parseOp1 = trans1 DashToken UnMinus <|> trans1 ExclamationToken UnNegation parseBBraces :: (Parser Token a) -> Parser Token a parseBBraces p = satTok BraceOpenToken *> p <* satTok BraceCloseToken @@ -168,7 +167,7 @@ parseTuple p = satTok BraceOpenToken *> <* satTok BraceCloseToken trans2 :: TokenValue (TokenValue -> a) -> Parser Token a -trans2 t f = satTok t >>= \(_, r).pure (f r) +trans2 t f = liftM (f o snd) $ satTok t trans1 :: TokenValue a -> Parser Token a trans1 t r = trans2 t $ const r