From e704674946219dfe86e112eae5a282a4b1b5f3e8 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Fri, 14 May 2021 20:42:52 +0200 Subject: [PATCH] Remove references to Join from the documentation (#419) * Remove references to Join from the documentation * Update optics/src/Optics.hs Co-authored-by: Adam Gundry Co-authored-by: Adam Gundry --- optics-core/src/Optics/Optic.hs | 4 ++-- optics/src/Optics.hs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/optics-core/src/Optics/Optic.hs b/optics-core/src/Optics/Optic.hs index 8e5cd234..b975e743 100644 --- a/optics-core/src/Optics/Optic.hs +++ b/optics-core/src/Optics/Optic.hs @@ -13,7 +13,7 @@ -- * the subtyping relation 'Is' with an accompanying 'castOptic' function to -- convert an optic kind; -- --- * the 'Join' operation used to find the optic kind resulting from a +-- * the 'JoinKinds' class used to find the optic kind resulting from a -- composition. -- -- Each optic kind is identified by a "tag type" (such as 'A_Lens'), which is an @@ -36,7 +36,7 @@ module Optics.Optic -- * Composition -- | The usual operator for composing optics is ('%'), which allows different -- optic kinds to be composed, automatically calculating the resulting optic - -- kind using 'Join'. + -- kind using 'JoinKinds'. -- -- The ('.') function composition operator cannot be used to compose optics, -- because /optics are not functions/. The ('Control.Category..') operator diff --git a/optics/src/Optics.hs b/optics/src/Optics.hs index 128cab05..4f081d4e 100644 --- a/optics/src/Optics.hs +++ b/optics/src/Optics.hs @@ -528,9 +528,10 @@ import Data.Either.Optics as P -- generates a type error if the composition does not make sense. -- -- The optic kind resulting from a composition is the least upper bound (join) --- of the optic kinds being composed, if it exists. The 'Join' type family +-- of the optic kinds being composed, if it exists. The 'JoinKinds' class -- computes the least upper bound given two optic kind tags. For example the --- 'Join' of a 'Lens' and a 'Prism' is an 'AffineTraversal'. +-- constraint 'JoinKinds A_Lens A_Prism k' makes GHC infer that @k@ must be +-- 'An_AffineTraversal'. -- -- >>> let res :: JoinKinds A_Lens A_Prism k => Proxy k; res = Proxy -- >>> :t res