From 6d649fe2c10ce4191e80e4f0260e88aace883925 Mon Sep 17 00:00:00 2001 From: Ross Paterson Date: Fri, 2 Feb 2007 11:09:31 +0000 Subject: [PATCH] add doc pointers to Foldable Could be applied to STABLE. --- Data/Sequence.hs | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 1.7.10.4