mirror of
https://github.com/ilyakooo0/streamly.git
synced 2024-09-11 08:25:40 +03:00
Fix hlint suggestions for Enumeration module
This commit is contained in:
parent
93d0326e13
commit
a0d3f83c31
@ -3,7 +3,6 @@ src/Streamly/Internal/Data/Stream/Serial.hs
|
||||
src/Streamly/Internal/Data/Stream/Zip.hs
|
||||
src/Streamly/Internal/Data/Stream/Parallel.hs
|
||||
src/Streamly/Internal/Data/Stream/Async.hs
|
||||
src/Streamly/Internal/Data/Stream/Enumeration.hs
|
||||
src/Streamly/Internal/Data/Stream/StreamDK.hs
|
||||
src/Streamly/Internal/Data/Stream/StreamK.hs
|
||||
src/Streamly/Internal/Data/Stream/StreamK/Type.hs
|
||||
|
@ -298,9 +298,9 @@ enumerateFromThenToSmall from next to = Serial.map toEnum $
|
||||
enumerateFromThenSmallBounded :: (IsStream t, Monad m, Enumerable a, Bounded a)
|
||||
=> a -> a -> t m a
|
||||
enumerateFromThenSmallBounded from next =
|
||||
case fromEnum next >= fromEnum from of
|
||||
True -> enumerateFromThenTo from next maxBound
|
||||
False -> enumerateFromThenTo from next minBound
|
||||
if fromEnum next >= fromEnum from
|
||||
then enumerateFromThenTo from next maxBound
|
||||
else enumerateFromThenTo from next minBound
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Enumerable type class
|
||||
@ -505,7 +505,7 @@ ENUMERABLE_UNBOUNDED_INTEGRAL(Integer)
|
||||
ENUMERABLE_UNBOUNDED_INTEGRAL(Natural)
|
||||
|
||||
#define ENUMERABLE_FRACTIONAL(FRACTIONAL_TYPE,CONSTRAINT) \
|
||||
instance (CONSTRAINT) => Enumerable (FRACTIONAL_TYPE) where { \
|
||||
instance (CONSTRAINT) => Enumerable FRACTIONAL_TYPE where { \
|
||||
{-# INLINE enumerateFrom #-}; \
|
||||
enumerateFrom = enumerateFromFractional; \
|
||||
{-# INLINE enumerateFromThen #-}; \
|
||||
@ -517,8 +517,8 @@ instance (CONSTRAINT) => Enumerable (FRACTIONAL_TYPE) where { \
|
||||
|
||||
ENUMERABLE_FRACTIONAL(Float,)
|
||||
ENUMERABLE_FRACTIONAL(Double,)
|
||||
ENUMERABLE_FRACTIONAL(Fixed a,HasResolution a)
|
||||
ENUMERABLE_FRACTIONAL(Ratio a,Integral a)
|
||||
ENUMERABLE_FRACTIONAL((Fixed a),HasResolution a)
|
||||
ENUMERABLE_FRACTIONAL((Ratio a),Integral a)
|
||||
|
||||
instance Enumerable a => Enumerable (Identity a) where
|
||||
{-# INLINE enumerateFrom #-}
|
||||
|
Loading…
Reference in New Issue
Block a user