minor fixes

flake
parent 6e9a804ea3
commit 6f6c475d16
Signed by: yogsototh
GPG Key ID: 7B19A4C650D59646

@ -33,7 +33,7 @@ library
base
, containers
, data-fix
, haskeline
, haskeline
, parsec
, pipes
, pretty

@ -1,4 +1,5 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE Strict #-}
module Data.Stack
( Stack

@ -13,7 +13,7 @@ import qualified Control.Exception as Exception
import Data.Fix
import qualified Data.Map.Strict as Map
import Protolude
import System.Process hiding (env)
import System.Process (createProcess,CreateProcess(..),StdStream(..),proc)
-- import System.Process.Streaming
import qualified Text.Show.Pretty as Pr

@ -27,7 +27,7 @@ toArg (Str s) = return $ Just $ toS s
toArg (Num i) = return . Just . toS . show $ i
toArg (Stream (Just h)) = lift $ fmap (Just . Text.strip .toS) (hGetContents h)
toArg (List xs) = do
strs <- traverse toArg (map unFix xs)
strs <- traverse (toArg . unFix) xs
return (Just ("["<> Text.intercalate " " (catMaybes strs) <> "]"))
toArg _ = return Nothing
@ -230,8 +230,8 @@ consCmd _ _ = return Void
equal :: Command
equal r [List xs,List ys] = do
reducedListX <- traverse r (map unFix xs)
reducedListY <- traverse r (map unFix ys)
reducedListX <- traverse (r . unFix) xs
reducedListY <- traverse (r . unFix) ys
return (Bool (reducedListX == reducedListY))
equal r [x,y] = do
reducedX <- r x

Loading…
Cancel
Save