Skip to content

Commit

Permalink
Remove references to Join from the documentation (#419)
Browse files Browse the repository at this point in the history
* Remove references to Join from the documentation

* Update optics/src/Optics.hs

Co-authored-by: Adam Gundry <adam@well-typed.com>

Co-authored-by: Adam Gundry <adam@well-typed.com>
  • Loading branch information
arybczak and adamgundry authored May 14, 2021
1 parent 7cc3f9c commit e704674
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions optics-core/src/Optics/Optic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions optics/src/Optics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e704674

Please sign in to comment.