Skip to content

Commit 9f4e9d5

Browse files
authored
Merge pull request #36 from reflex-frp/improve-doc
Improve module headers
2 parents 61d36d1 + 0d03cbc commit 9f4e9d5

File tree

11 files changed

+62
-26
lines changed

11 files changed

+62
-26
lines changed

src/Data/Functor/Misc.hs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@
1010
{-# LANGUAGE RankNTypes #-}
1111
{-# LANGUAGE ScopedTypeVariables #-}
1212
{-# LANGUAGE StandaloneDeriving #-}
13-
-- | This module provides types and functions with no particular theme, but
14-
-- which are relevant to the use of 'Functor'-based datastructures like
15-
-- 'Data.Dependent.Map.DMap'.
13+
14+
{- |
15+
Description: Misc utilities relating to functor.
16+
17+
This module provides types and functions with no particular theme, but which
18+
are relevant to the use of 'Functor'-based datastructures like
19+
'Data.Dependent.Map.DMap'.
20+
-}
1621
module Data.Functor.Misc
1722
( -- * Const2
1823
Const2 (..)

src/Data/Monoid/DecidablyEmpty.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
{-# LANGUAGE TypeOperators #-}
66

77
-- TODO upstream somwhere else?
8+
{-|
9+
Description: This module provides a class to decide whether a monoid element is the identity.
10+
-}
811
module Data.Monoid.DecidablyEmpty where
912

1013
import Data.Functor.Identity

src/Data/Patch.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
{-# LANGUAGE StandaloneDeriving #-}
44
{-# LANGUAGE TypeFamilies #-}
55
{-# LANGUAGE TypeOperators #-}
6-
-- |
7-
-- Module:
8-
-- Data.Patch
9-
-- Description:
10-
-- This module defines the 'Patch' class.
6+
7+
{-|
8+
Description:
9+
This module defines the 'Group' class, and reexports the other modules.
10+
-}
1111
module Data.Patch
1212
( module Data.Patch
1313
, module X

src/Data/Patch/Class.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE ScopedTypeVariables #-}
33
{-# LANGUAGE TypeFamilies #-}
4-
-- | The interface for types which represent changes made to other types
4+
5+
{-|
6+
Description: The module provides the 'Patch' class.
7+
8+
This is a class for types which represent changes made to other types
9+
-}
510
module Data.Patch.Class where
611

712
import Data.Functor.Identity

src/Data/Patch/DMap.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
{-# LANGUAGE StandaloneDeriving #-}
88
{-# LANGUAGE TypeFamilies #-}
99

10-
-- | 'Patch'es on 'DMap' that consist only of insertions (or overwrites) and deletions.
10+
{-|
11+
Description: A basic 'Patch' on 'DMap'
12+
13+
Patches of this type consist only of insertions (including overwrites) and
14+
deletions.
15+
-}
1116
module Data.Patch.DMap where
1217

1318
import Data.Patch.Class

src/Data/Patch/DMapWithMove.hs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@
1111
{-# LANGUAGE TypeFamilies #-}
1212
{-# LANGUAGE UndecidableInstances #-}
1313

14-
-- |Module containing @'PatchDMapWithMove' k v@ and associated functions, which represents a 'Patch' to a @'DMap' k v@ which can insert, update, delete, and
15-
-- move values between keys.
14+
{-|
15+
Description: A more advanced 'Patch' for 'DMap'.
16+
17+
This Module contains @'PatchDMapWithMove' k v@ and associated functions, which
18+
represents a 'Patch' to a @'DMap' k v@ which can insert, update, delete, and
19+
move values between keys.
20+
-}
1621
module Data.Patch.DMapWithMove where
1722

1823
import Data.Patch.Class

src/Data/Patch/IntMap.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
{-# LANGUAGE TemplateHaskell #-}
88
{-# LANGUAGE TypeFamilies #-}
99

10-
-- | Module containing 'PatchIntMap', a 'Patch' for 'IntMap' which allows for
11-
-- insert/update or delete of associations.
10+
{-|
11+
Description: Module containing 'PatchIntMap', a 'Patch' for 'IntMap'.
12+
13+
Patches of this sort allow for insert/update or delete of associations.
14+
-}
1215
module Data.Patch.IntMap where
1316

1417
import Control.Lens

src/Data/Patch/Map.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88
{-# LANGUAGE TemplateHaskell #-}
99
{-# LANGUAGE TypeFamilies #-}
1010

11-
-- | 'Patch'es on 'Map' that consist only of insertions (including overwrites)
12-
-- and deletions
11+
{-|
12+
Description: A basic 'Patch' on 'Map'
13+
14+
Patches of this type consist only of insertions (including overwrites) and
15+
deletions.
16+
-}
1317
module Data.Patch.Map where
1418

1519
import Data.Patch.Class

src/Data/Patch/MapWithMove.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
{-# LANGUAGE TypeFamilies #-}
1515
{-# LANGUAGE ViewPatterns #-}
1616

17-
-- | 'Patch'es on 'Map' that can insert, delete, and move values from one key to
18-
-- another
17+
{-|
18+
Description: An intermediate 'Patch' on 'Map'
19+
20+
Patches of this type can insert, delete, and also move values from one key to
21+
another.
22+
-}
1923
module Data.Patch.MapWithMove
2024
( PatchMapWithMove
2125
( PatchMapWithMove

src/Data/Patch/MapWithPatchingMove.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@
1111
{-# LANGUAGE TypeFamilies #-}
1212
{-# LANGUAGE UndecidableInstances #-}
1313

14-
-- | 'Patch'es on 'Map' that can insert, delete, and move values from one key to
15-
-- another
14+
{-|
15+
Description: An advanced 'Patch' on 'Map'
16+
17+
Patches of this type can can insert, delete, and move values from one key to
18+
another, and move patches may also additionally patch the value being moved.
19+
-}
1620
module Data.Patch.MapWithPatchingMove
1721
( PatchMapWithPatchingMove (..)
1822
, patchMapWithPatchingMove

0 commit comments

Comments
 (0)