on master help sign in
Eta expand _Sub
8467038Matthew Pickering
src/Data/Generics/Sum/Subtype.hs+1−1
@@ -86,7 +86,7 @@ class AsSubtype sub sup where
86 -- >>> duck ^? _Sub :: Maybe FourLeggedAnimal
86 -- >>> duck ^? _Sub :: Maybe FourLeggedAnimal
87 -- Nothing
87 -- Nothing
88 _Sub :: Prism' sup sub
88 _Sub :: Prism' sup sub
89− _Sub = prism injectSub projectSub
89+ _Sub eta = prism injectSub projectSub eta
90
90
91 -- |Injects a subtype into a supertype (upcast).
91 -- |Injects a subtype into a supertype (upcast).
92 injectSub :: sub -> sup
92 injectSub :: sub -> sup