Eta expand _Sub
commit8467038d265e40ef86a2245d4f57364511fd08e6
authorMatthew Pickering <matthewtpickering@gmail.com>
dateTue 16 Jan 2018, 14:01 (9 years ago)
parent81e7fec
src/Data/Generics/Sum/Subtype.hs+1−1
@@ -86,7 +86,7 @@ class AsSubtype sub sup where
8686 -- >>> duck ^? _Sub :: Maybe FourLeggedAnimal
8787 -- Nothing
8888 _Sub :: Prism' sup sub
89− _Sub = prism injectSub projectSub
89+ _Sub eta = prism injectSub projectSub eta
9090
9191 -- |Injects a subtype into a supertype (upcast).
9292 injectSub :: sub -> sup