Skip to content

Commit

Permalink
Mention the result in the error message for JoinKinds
Browse files Browse the repository at this point in the history
Fixes #453.
  • Loading branch information
arybczak committed May 20, 2022
1 parent 337165b commit ab4c027
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion optics-core/src/Optics/Internal/Optic/Subtyping.hs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ instance k ~ A_Setter => JoinKinds A_Setter A_Traversal

instance {-# OVERLAPPABLE #-}
( JoinKinds k l m
, TypeError ('ShowType k ':<>: 'Text " cannot be composed with " ':<>: 'ShowType l)
, TypeError ('ShowType k ':<>: 'Text " cannot be composed with " ':<>:
'ShowType l ':<>: 'Text " into " ':<>:
'ShowType m)
) => JoinKinds k l m where
joinKinds _ = error "unreachable"
2 changes: 1 addition & 1 deletion optics/src/Optics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ import Data.Either.Optics as P
--
-- >>> :t mapped % folded
-- ...
-- ...A_Setter cannot be composed with A_Fold
-- ...A_Setter cannot be composed with A_Fold...
-- ...
--
-- The ('Control.Category..') operator from "Control.Category" cannot be used to
Expand Down

0 comments on commit ab4c027

Please sign in to comment.