You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from neither = nor
from nor = neither
neither.nor =id
nor.neither =id
Unfortunately, this example appears to have bitrotted severely, as it no longer compiles with modern lens. Declaring makePrisms ''Neither won't generate Isos named neitherornor, despite what it claims, but rather it will generate:
As far as I can tell, there is no TH functionality to generate the norIso above. (You can use makeLenses ''Prisms, but that will generate nor :: Iso (Neither a b) (Neither c d) (Either a b) (Either c d), which is a different type than the one claimed above.)
My guess is that generating neither/nor was the behavior of the old makeIso function, which was removed nearly six years ago in favor of makePrisms. However, this example in the README was never updated accordingly.
The text was updated successfully, but these errors were encountered:
The section in the `README` about TH-generated prisms for newtypes has
severely bitrotted to the point where it doesn't compile anymore. I have
attempted to modernize this section and document what the current behavior is.
Resolves#914.
[ci skip]
The section in the `README` about TH-generated prisms for newtypes has
severely bitrotted to the point where it doesn't compile anymore. I have
attempted to modernize this section and document what the current behavior is.
Resolves#914.
[ci skip]
The
README
currently provides this example of how to usemakePrisms
:Unfortunately, this example appears to have bitrotted severely, as it no longer compiles with modern
lens
. DeclaringmakePrisms ''Neither
won't generateIso
s namedneither
ornor
, despite what it claims, but rather it will generate:As far as I can tell, there is no TH functionality to generate the
nor
Iso
above. (You can usemakeLenses ''Prisms
, but that will generatenor :: Iso (Neither a b) (Neither c d) (Either a b) (Either c d)
, which is a different type than the one claimed above.)My guess is that generating
neither
/nor
was the behavior of the oldmakeIso
function, which was removed nearly six years ago in favor ofmakePrisms
. However, this example in theREADME
was never updated accordingly.The text was updated successfully, but these errors were encountered: