Add comment about name conflict on Any

This commit is contained in:
Lysxia 2020-03-01 15:21:18 -05:00
parent 45385ca0be
commit f4a79fd7b3
2 changed files with 9 additions and 1 deletions

View File

@ -173,12 +173,15 @@ type instance Eval (All p lst) = Eval (Foldr (Bicomap p Pure (&&)) 'True lst)
-- >>> :kind! Eval (Or '[ 'False, 'False])
-- Eval (Or '[ 'False, 'False]) :: Bool
-- = 'False
data Or :: [Bool] -> Exp Bool
data Or :: t Bool -> Exp Bool
type instance Eval (Or lst) = Eval (Foldr (||) 'False lst)
-- | Whether any element of the list satisfies a predicate.
--
-- Note: this identifier conflicts with 'Fcf.Utils.Any' (from "Fcf.Utils"),
-- 'Data.Monoid.Any' (from "Data.Monoid"), and 'GHC.Exts.Any' (from "GHC.Exts").
--
-- === __Example__
--
-- >>> :kind! Eval (Any (Flip (<) 5) '[0,1,2,3,4,5])

View File

@ -125,6 +125,11 @@ type (-->) = ('Match_ :: j -> k -> Match j k)
type Is = ('Is_ :: (j -> Exp Bool) -> k -> Match j k)
-- | Match any type in 'Case'. Should be used as a final branch.
--
-- Note: this identifier conflicts with 'Fcf.Class.Foldable.Any' (from "Fcf.Class.Foldable")
-- 'Data.Monoid.Any' (from "Data.Monoid"), and 'GHC.Exts.Any' (from "GHC.Exts").
--
-- We recommend importing this one qualified.
type Any = ('Any_ :: k -> Match j k)
-- | Pass type being matched in 'Case' to subcomputation. Should be used as a