From ca74e2901d52ab934f5b042a12d61d8477704cb0 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 8 Dec 2016 09:47:06 +0000 Subject: [PATCH] document structure --- docs/Applicative.rst | 9 ++++++--- docs/Bool.rst | 2 ++ docs/Either.rst | 2 ++ docs/Folds.rst | 2 ++ docs/List.rst | 21 ++++++++++++++------- docs/Maybe.rst | 2 ++ docs/Monad.rst | 6 ++++-- docs/Monoid.rst | 2 ++ docs/Numbers.rst | 2 ++ docs/Strings.rst | 14 ++++++++++++++ docs/index.rst | 4 ++-- 11 files changed, 52 insertions(+), 14 deletions(-) create mode 100644 docs/Bool.rst create mode 100644 docs/Either.rst create mode 100644 docs/Folds.rst create mode 100644 docs/Maybe.rst create mode 100644 docs/Monoid.rst create mode 100644 docs/Numbers.rst create mode 100644 docs/Strings.rst diff --git a/docs/Applicative.rst b/docs/Applicative.rst index 1474840bc..f1f42eb7e 100644 --- a/docs/Applicative.rst +++ b/docs/Applicative.rst @@ -1,7 +1,8 @@ Applicative =========== -#### Functor +Functor +~~~~~~~ ```haskell class Functor (f :: * -> *) where @@ -17,7 +18,8 @@ class Functor (f :: * -> *) where ($>) :: Functor f => f a -> b -> f b ``` -#### Applicatives +Applicatives +~~~~~~~~~~~~ ```haskell class Functor f => Applicative (f :: * -> *) where @@ -43,7 +45,8 @@ orEmpty :: Alternative f => Bool -> a -> f a eitherA :: (Alternative f) => f a -> f b -> f (Either a b) ``` -#### Alternative +Alternative +~~~~~~~~~~~ ```haskell class Applicative f => Alternative (f :: * -> *) where diff --git a/docs/Bool.rst b/docs/Bool.rst new file mode 100644 index 000000000..897a6ae65 --- /dev/null +++ b/docs/Bool.rst @@ -0,0 +1,2 @@ +Bool +===== diff --git a/docs/Either.rst b/docs/Either.rst new file mode 100644 index 000000000..4b0819784 --- /dev/null +++ b/docs/Either.rst @@ -0,0 +1,2 @@ +Either +====== diff --git a/docs/Folds.rst b/docs/Folds.rst new file mode 100644 index 000000000..3a76da4ad --- /dev/null +++ b/docs/Folds.rst @@ -0,0 +1,2 @@ +Folds +===== diff --git a/docs/List.rst b/docs/List.rst index 3135a4926..53f6275d2 100644 --- a/docs/List.rst +++ b/docs/List.rst @@ -1,7 +1,8 @@ List ==== -#### Slicing +Slicing +~~~~~~~ ```haskell head :: Foldable f => f a -> Maybe a @@ -47,7 +48,8 @@ drop :: Int -> [a] -> [a] take :: Int -> [a] -> [a] ``` -#### Unpacking +Unpacking +~~~~~~~~~ ```haskell uncons :: [a] -> Maybe (a, [a]) @@ -57,19 +59,22 @@ uncons :: [a] -> Maybe (a, [a]) unsnoc :: [x] -> Maybe ([x],x) ``` -#### Sorting +Sorting +~~~~~~~~~ ```haskell sortOn :: Ord o => (a -> o) -> [a] -> [a] ``` -#### Removing +Removing +~~~~~~~~~ ```haskell ordNub :: Ord a => [a] -> [a] ``` -#### Splitting +Splitting +~~~~~~~~~ ```haskell splitAt :: Int -> [a] -> ([a], [a]) @@ -83,13 +88,15 @@ splitAt :: Int -> [a] -> ([a], [a]) intercalate :: [a] -> [[a]] -> [a] ``` -#### Comparison +Comparison +~~~~~~~~~ ```haskell isPrefixOf :: Eq a => [a] -> [a] -> Bool ``` -#### Filter +Filtering +~~~~~~~~~ ```haskell filter :: (a -> Bool) -> [a] -> [a] diff --git a/docs/Maybe.rst b/docs/Maybe.rst new file mode 100644 index 000000000..39fcdbb68 --- /dev/null +++ b/docs/Maybe.rst @@ -0,0 +1,2 @@ +Maybe +===== diff --git a/docs/Monad.rst b/docs/Monad.rst index 53452fdc2..9441ef5df 100644 --- a/docs/Monad.rst +++ b/docs/Monad.rst @@ -1,7 +1,8 @@ Monads ====== -#### Monad +Monad +~~~~~ ```haskell class Applicative m => Monad (m :: * -> *) where @@ -119,7 +120,8 @@ ap :: Monad m => m (a -> b) -> m a -> m b (<$!>) :: Monad m => (a -> b) -> m a -> m b ``` -#### MonadPlus +MonadPlus +~~~~~~~~~ ```haskell class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where diff --git a/docs/Monoid.rst b/docs/Monoid.rst new file mode 100644 index 000000000..86bbceb38 --- /dev/null +++ b/docs/Monoid.rst @@ -0,0 +1,2 @@ +Monoid +====== diff --git a/docs/Numbers.rst b/docs/Numbers.rst new file mode 100644 index 000000000..fcaa14edc --- /dev/null +++ b/docs/Numbers.rst @@ -0,0 +1,2 @@ +Numbers +======= diff --git a/docs/Strings.rst b/docs/Strings.rst new file mode 100644 index 000000000..2d218dd04 --- /dev/null +++ b/docs/Strings.rst @@ -0,0 +1,14 @@ +Strings +======= + +Text +~~~~ + +LText +~~~~ + +Bytestring +~~~~~~~~~~ + +LBytestring +~~~~~~~~~~~ diff --git a/docs/index.rst b/docs/index.rst index 127aba249..2a0ea5ad9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,7 +4,7 @@ Protolude Documentation An alternative Prelude. .. toctree:: - :maxdepth: 1 + :maxdepth: 0 Printing Files Strings @@ -28,7 +28,7 @@ An alternative Prelude. ST Concurrency Storable - Systsem + System Map Set Tuple