Merge pull request #3203 from unisonweb/one-less-abt2

PR feedback from #3113
This commit is contained in:
Paul Chiusano 2022-07-07 14:57:00 -04:00 committed by GitHub
commit 97c6ae6d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 8 deletions

View File

@ -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

View File

@ -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