From: Ross Paterson Date: Fri, 2 Feb 2007 11:09:31 +0000 (+0000) Subject: add doc pointers to Foldable X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6d649fe2c10ce4191e80e4f0260e88aace883925;p=haskell-directory.git add doc pointers to Foldable Could be applied to STABLE. --- diff --git a/Data/Sequence.hs b/Data/Sequence.hs index 402dcfe..318dc20 100644 --- a/Data/Sequence.hs +++ b/Data/Sequence.hs @@ -41,6 +41,9 @@ module Data.Sequence ( (><), -- :: Seq a -> Seq a -> Seq a fromList, -- :: [a] -> Seq a -- * Deconstruction + -- | Additional functions for deconstructing sequences are available + -- via the 'Foldable' instance of 'Seq'. + -- ** Queries null, -- :: Seq a -> Bool length, -- :: Seq a -> Int @@ -1008,6 +1011,8 @@ splitDigit i (Four a b c d) ------------------------------------------------------------------------ -- | /O(n)/. Create a sequence from a finite list of elements. +-- There is a function 'toList' in the opposite direction for all +-- instances of the 'Foldable' class, including 'Seq'. fromList :: [a] -> Seq a fromList = Data.List.foldl' (|>) empty