Add back in case change but keep the eta expansiona as it was
commit669770b5698b614a183c7fa3b1223ff59607bbee
authorMatthew Pickering <matthewtpickering@gmail.com>
dateWed 24 Jan 2018, 11:53 (9 years ago)
parent85b2230
src/Data/Generics/Internal/VL/Lens.hs+2−2
@@ -50,8 +50,8 @@ set l x = l .~ x
5050lens2lensvl :: ALens a b s t -> Lens s t a b
5151lens2lensvl (ALens _get _set) =
5252 \f x ->
53− let (c, a) = oneShot _get (inline x)
54− in oneShot (_set . (c, )) <$> f (inline a)
53+ case _get x of
54+ (c, a) -> _set . (c, ) <$> f a
5555{-# INLINE lens2lensvl #-}
5656
5757ravel :: (ALens a b a b -> ALens a b s t)
src/Data/Generics/Product/Positions.hs+1−1
@@ -118,7 +118,7 @@ instance -- see Note [Changing type parameters]
118118 , s ~ Infer t b' a
119119 ) => HasPosition i s t a b where
120120
121− position f s = VL.ravel (repLens . gposition @i) f s
121+ position = VL.ravel (repLens . gposition @i)
122122 {-# INLINE position #-}
123123
124124-- See Note [Uncluttering type signatures]