Skip to content

Commit

Permalink
Fix up the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vigress8 committed Dec 5, 2024
1 parent dafaf9b commit e775ee6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions classy-prelude/src/ClassyPrelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -632,15 +632,17 @@ getContents = liftIO LTextIO.getContents
interact :: MonadIO m => (LText -> LText) -> m ()
interact = liftIO . LTextIO.interact

-- | Pattern synonyms for working with sequences,
-- corresponding to [] and (x : xs) for List
{-# COMPLETE Empty, Cons #-}
-- | Corresponds to [] for List
--
-- @since 1.5.1
{-# COMPLETE Empty, Cons #-}
pattern Empty :: IsSequence seq => seq
pattern Empty <- (uncons -> Nothing) where
Empty = fromList []

-- | Corresponds to (x : xs) for List
--
-- @since 1.5.1
pattern Cons :: IsSequence seq => Element seq -> seq -> seq
pattern Cons x xs <- (uncons -> Just (x, xs)) where
Cons = cons
Expand Down

0 comments on commit e775ee6

Please sign in to comment.