cleaning show/repr
This commit is contained in:
parent
e6207fd301
commit
403c45e666
2 changed files with 3 additions and 6 deletions
|
@ -63,7 +63,7 @@ evalReduced (WaitingStream (Just h)) = do
|
|||
let splittedLines = lines cmdoutput
|
||||
producer = mapM_ yield splittedLines
|
||||
runEffect (for producer (lift . putStrLn))
|
||||
evalReduced x = putStrLn (show x)
|
||||
evalReduced x = putStrLn (repr x)
|
||||
|
||||
-- | Evaluate the parsed expr
|
||||
eval :: Env -> Either ParseError SExp -> InputT IO Env
|
||||
|
|
|
@ -26,17 +26,14 @@ data SExp = Atom Text
|
|||
| Lambda [SExp]
|
||||
| Void
|
||||
-- only exists during evaluation
|
||||
| Fn { params :: [Text]
|
||||
, body :: [SExp]
|
||||
| Fn { params :: [Text]
|
||||
, body :: [SExp]
|
||||
, closure :: Env
|
||||
}
|
||||
| Stream CmdStream
|
||||
| WaitingStream CmdStream
|
||||
deriving (Eq,Show)
|
||||
|
||||
-- instance Show SExp where
|
||||
-- show = toS . repr
|
||||
|
||||
repr :: SExp -> Text
|
||||
repr (Atom s) = s
|
||||
repr (Num n) = toS $ show n
|
||||
|
|
Loading…
Reference in a new issue