Cleanup, hlints
This commit is contained in:
+9
-10
@@ -37,16 +37,15 @@ conLDTToConDT = \case
|
||||
|
||||
dtStartPropagate :: (a -> c) -> (c -> a -> c) -> DTree a -> DTree c
|
||||
dtStartPropagate g f (DT x l r) = DT z
|
||||
(fmap (\(t) -> (dtPropagate' z f t)) l)
|
||||
(fmap (\(t) -> (dtPropagate' z f t)) r)
|
||||
(fmap (dtPropagate' f z) l)
|
||||
(fmap (dtPropagate' f z) r)
|
||||
where
|
||||
z = g x
|
||||
|
||||
|
||||
dtPropagate' :: c -> (c -> a -> c) -> DTree a -> DTree c
|
||||
dtPropagate' x f (DT y l r) = DT z
|
||||
(fmap (\(t) -> (dtPropagate' z f t)) l)
|
||||
(fmap (\(t) -> (dtPropagate' z f t)) r)
|
||||
dtPropagate' :: (c -> a -> c) -> c -> DTree a -> DTree c
|
||||
dtPropagate' f x (DT y l r) = DT z
|
||||
(fmap (dtPropagate' f z) l)
|
||||
(fmap (dtPropagate' f z) r)
|
||||
where
|
||||
z = f x y
|
||||
|
||||
@@ -291,12 +290,12 @@ locUp' (LocDT c@LeftwardDT{} t) =
|
||||
Just $
|
||||
LocDT
|
||||
(_cdtUp c)
|
||||
(DT (_cdtParent c) (_cdtCloseLeft c ++ (( t) : _cdtCloseRight c)) (_cdtFarRight c))
|
||||
(DT (_cdtParent c) (_cdtCloseLeft c ++ ( t : _cdtCloseRight c)) (_cdtFarRight c))
|
||||
locUp' (LocDT c@RightwardDT{} t) =
|
||||
Just $
|
||||
LocDT
|
||||
(_cdtUp c)
|
||||
(DT (_cdtParent c) (_cdtFarLeft c) (_cdtCloseLeft c ++ (( t) : _cdtCloseRight c)))
|
||||
(DT (_cdtParent c) (_cdtFarLeft c) (_cdtCloseLeft c ++ ( t : _cdtCloseRight c)))
|
||||
|
||||
locToTop' :: LocationDT a -> LocationDT a
|
||||
locToTop' loc = maybe loc locToTop' $ locUp' loc
|
||||
@@ -333,7 +332,7 @@ locDTGoLeft (LocDT c (DT v l r)) =
|
||||
-- should probably do tests for these
|
||||
locDTGoRight :: LocationDT a -> [LocationDT a]
|
||||
locDTGoRight (LocDT c (DT v l r)) =
|
||||
[LocDT (RightwardDT c l closel v closer) t | (closel, ( t), closer) <- locDTGoHelp id r]
|
||||
[LocDT (RightwardDT c l closel v closer) t | (closel, t, closer) <- locDTGoHelp id r]
|
||||
|
||||
-- this seems like it might be very inefficient for large lists
|
||||
-- difference lists?
|
||||
|
||||
Reference in New Issue
Block a user