@@ -86,17 +86,17 @@ class AsSubtype sub sup where
87 -- >>> duck ^? _Sub :: Maybe FourLeggedAnimal
87 -- >>> duck ^? _Sub :: Maybe FourLeggedAnimal
88 -- Nothing
88 -- Nothing
89− _Sub :: Prism' sup sub
89+ _Sub :: PrismVL' sup sub
90− _Sub eta = prism injectSub projectSub eta
90+ _Sub eta = prismVL injectSub projectSub eta
91 {-# INLINE _Sub #-}
91 {-# INLINE _Sub #-}
93 -- |Injects a subtype into a supertype (upcast).
93 -- |Injects a subtype into a supertype (upcast).
94 injectSub :: sub -> sup
94 injectSub :: sub -> sup
95− injectSub = build (_Sub @sub @sup)
95+ injectSub = buildVL (_Sub @sub @sup)
97 -- |Projects a subtype from a supertype (downcast).
97 -- |Projects a subtype from a supertype (downcast).
98 projectSub :: sup -> Either sup sub
98 projectSub :: sup -> Either sup sub
99− projectSub = withPrism (_Sub @sub @sup) (\_ b -> b)
99+ projectSub = matchVL (_Sub @sub @sup)
101 {-# MINIMAL (injectSub, projectSub) | _Sub #-}
101 {-# MINIMAL (injectSub, projectSub) | _Sub #-}
@@ -106,7 +106,7 @@ instance
106 , GAsSubtype (Rep sub) (Rep sup)
106 , GAsSubtype (Rep sub) (Rep sup)
107 ) => AsSubtype sub sup where
107 ) => AsSubtype sub sup where
109− _Sub = repIso . _GSub . fromIso repIso
109+ _Sub = prismVLRavel (repIso . _GSub . fromIso repIso)
111-- See Note [Uncluttering type signatures]
111-- See Note [Uncluttering type signatures]
112instance {-# OVERLAPPING #-} AsSubtype a Void where
112instance {-# OVERLAPPING #-} AsSubtype a Void where