1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

Rename the HasSpan start/end lenses to start_/end_.

This commit is contained in:
Rob Rix 2019-09-20 16:39:06 -04:00
parent 1e6ebd21a3
commit 57c385d265
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -86,23 +86,23 @@ column_ = lens column (\p l -> p { column = l })
class HasSpan a where class HasSpan a where
span :: Lens' a Span span :: Lens' a Span
start :: Lens' a Pos start_ :: Lens' a Pos
start = span.start start_ = span.start_
{-# INLINE start #-} {-# INLINE start_ #-}
end :: Lens' a Pos end_ :: Lens' a Pos
end = span.end end_ = span.end_
{-# INLINE end #-} {-# INLINE end_ #-}
instance HasSpan Span where instance HasSpan Span where
span = id span = id
{-# INLINE span #-} {-# INLINE span #-}
start = lens spanStart (\s t -> s { spanStart = t }) start_ = lens spanStart (\s t -> s { spanStart = t })
{-# INLINE start #-} {-# INLINE start_ #-}
end = lens spanEnd (\s t -> s { spanEnd = t }) end_ = lens spanEnd (\s t -> s { spanEnd = t })
{-# INLINE end #-} {-# INLINE end_ #-}
type Lens' s a = forall f . Functor f => (a -> f a) -> (s -> f s) type Lens' s a = forall f . Functor f => (a -> f a) -> (s -> f s)