From f6473674e44724d36c9eec461247c14dd73e422e Mon Sep 17 00:00:00 2001 From: brunjlar Date: Fri, 17 Jun 2016 02:55:22 +0200 Subject: [PATCH] removed redundant constraints --- src/Data/Utils/Pipes.hs | 2 +- src/Numeric/Neural/Normalization.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Utils/Pipes.hs b/src/Data/Utils/Pipes.hs index 5942a67..b52ec38 100644 --- a/src/Data/Utils/Pipes.hs +++ b/src/Data/Utils/Pipes.hs @@ -52,7 +52,7 @@ chunks n = forever $ lowerCodensity (replicateM n (lift await)) >>= yield -- | Safely produces 'ByteString's from a file. -- -fromFile :: (MonadSafe m, MonadIO m) => FilePath -> Producer' ByteString m () +fromFile :: MonadSafe m => FilePath -> Producer' ByteString m () fromFile f = P.withFile f ReadMode fromHandle -- | Converts a stream of 'ByteString's into a stream of 'Word8's. diff --git a/src/Numeric/Neural/Normalization.hs b/src/Numeric/Neural/Normalization.hs index 2e50a47..1771417 100644 --- a/src/Numeric/Neural/Normalization.hs +++ b/src/Numeric/Neural/Normalization.hs @@ -69,7 +69,7 @@ encode1ofN x = generate $ \i -> if i == fromEnum x then 1 else 0 -- >>> decode1ofN [0.2, 0.3, 0.8 :: Double] :: Ordering -- GT -- -decode1ofN :: (Enum a, Num b, Ord b, Foldable f) => f b -> a +decode1ofN :: (Enum a, Ord b, Foldable f) => f b -> a decode1ofN = toEnum . fst . maximumBy (compare `on` snd) . zip [0..] . toList polyhedron :: Floating a => Int -> [[a]]