diff --git a/codebase2/core/U/Core/ABT.hs b/codebase2/core/U/Core/ABT.hs index 780b4862f..a3d03b688 100644 --- a/codebase2/core/U/Core/ABT.hs +++ b/codebase2/core/U/Core/ABT.hs @@ -76,7 +76,7 @@ instance (forall a. Show a => Show (f a), Show v) => Show (Term f v a) where Abs v body -> showParen True $ (show v ++) . showString ". " . showsPrec p body Tm f -> showsPrec p f -amap :: (Functor f, Foldable f) => (a -> a') -> Term f v a -> Term f v a' +amap :: Functor f => (a -> a') -> Term f v a -> Term f v a' amap = fmap vmap :: (Functor f, Foldable f, Ord v') => (v -> v') -> Term f v a -> Term f v' a diff --git a/unison-core/src/Unison/ABT.hs b/unison-core/src/Unison/ABT.hs index c4ba36a98..ecbb4428e 100644 --- a/unison-core/src/Unison/ABT.hs +++ b/unison-core/src/Unison/ABT.hs @@ -200,13 +200,6 @@ amap' f t@(Term _ a out) = case out of Cycle r -> cycle' (f t a) (amap' f r) Abs v body -> abs' (f t a) v (amap' f body) --- amap :: (Functor f, Foldable f) => (a -> a') -> Term f v a -> Term f v a' --- amap f (Term fv a out) = Term fv (f a) $ case out of --- Var v -> Var v --- Tm fa -> Tm (amap f <$> fa) --- Cycle r -> Cycle (amap f r) --- Abs v body -> Abs v (amap f body) - extraMap :: Functor g => (forall k. f k -> g k) -> Term f v a -> Term g v a extraMap p (Term fvs a sub) = Term fvs a (go p sub) where