Skip to content

Commit

Permalink
Add comments to *.Disambiguation modules
Browse files Browse the repository at this point in the history
Follow-up to commit
d06c203.

[ci skip]
  • Loading branch information
RyanGlScott committed Dec 22, 2019
1 parent 42c0b5b commit cbb35ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Data/Singletons/Prelude/Ord/Disambiguation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
-- Stability : experimental
-- Portability : non-portable
--
-- TODO RGS
-- Provides aliases for 'Min' and 'Max' that do not clash with the data
-- types of the same names in Data.Singletons.Prelude.Semigroup.
--
----------------------------------------------------------------------------

Expand Down
10 changes: 8 additions & 2 deletions src/Data/Singletons/Prelude/Semigroup/Internal/Disambiguation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
-- Stability : experimental
-- Portability : non-portable
--
-- TODO RGS
-- Provides aliases for 'All', 'Any', 'Sum', and 'Product' that do not clash
-- with the promoted functions of the same names in
-- Data.Singletons.Prelude.Foldable.
--
----------------------------------------------------------------------------

Expand All @@ -26,7 +28,11 @@ import Data.Semigroup
import Data.Singletons.Prelude.Semigroup.Internal
import Data.Singletons.Single

-- We need these in Data.Singletons.Prelude.Foldable.
-- We need these in Data.Singletons.Prelude.Foldable, as we need to promote
-- code that simultaneously uses the All/Any/Sum/Product constructors and the
-- all/any/sum/product functions, which have clashing defunctionalization
-- symbol names. Our workaround is to simply define synonyms for
-- all/any/sum/product and use those instead.
$(singletons [d|
all_ :: Bool -> All
all_ = All
Expand Down

0 comments on commit cbb35ad

Please sign in to comment.