From 05009fe570a0cacf0c04db146cf94de5c3c2f2a9 Mon Sep 17 00:00:00 2001 From: Deyaaeldeen Almahallawi Date: Mon, 3 Dec 2018 00:16:03 -0500 Subject: [PATCH] generalize getSnd type --- Language/Grift/Source/Utils.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Language/Grift/Source/Utils.hs b/Language/Grift/Source/Utils.hs index a0683c9..2ef92d6 100644 --- a/Language/Grift/Source/Utils.hs +++ b/Language/Grift/Source/Utils.hs @@ -9,8 +9,6 @@ module Language.Grift.Source.Utils , stripSnd ) where -import Data.Monoid (Sum (..)) - import Language.Grift.Source.Syntax @@ -24,7 +22,7 @@ para f (Ann a e) = f a $ fmap keepCopy e where bottomUp :: forall a b e. Functor e => (a -> e (Ann b e) -> b) -> Ann a e -> Ann b e bottomUp fn = cata (\a e -> Ann (fn a e) e) -getSnd :: forall a e. Ann (a, Sum Int) e -> Sum Int +getSnd :: forall a b e. Ann (a, b) e -> b getSnd (Ann (_, n) _) = n getFst :: forall a b. Ann (a, b) Type -> a