@@ -163,10 +163,9 @@ pCmd :: P.IdrisParser (Either String Command)
163163pCmd = choice [ do c <- cmd names; parser c
164164 | (names, _, _, parser) <- parserCommandsForHelp ++ parserCommands ]
165165 <|> unrecognized
166− <|> nop
166+ <|> nop
167167 <|> eval
168168 where nop = do eof; return (Right NOP)
169− eval = exprArg Eval ""
170169 unrecognized = do
171170 P.lchar ':'
172171 cmd <- many anyChar
@@ -194,6 +193,11 @@ noArgs cmd name = do
194193
195194 emptyArgs <|> failure
196195
196+eval :: P.IdrisParser (Either String Command)
197+eval = do
198+ t <- P.fullExpr defaultSyntax
199+ return $ Right (Eval t)
200+
197201exprArg :: (PTerm -> Command) -> String -> P.IdrisParser (Either String Command)
198202exprArg cmd name = do
199203 let noArg = do
@@ -201,9 +205,9 @@ exprArg cmd name = do
201205 return $ Left ("Usage is :" ++ name ++ " <expression>")
202206
203207 let justOperator = do
204− (op, fc) <- P.maybeWithNS P.operatorFC False []
208+ (op, fc) <- P.operatorFC
205209 eof
206− return $ Right $ cmd (PRef fc [] op)
210+ return $ Right $ cmd (PRef fc [] (sUN op))
207211
208212 let properArg = do
209213 t <- P.fullExpr defaultSyntax