From 2ca8cf69c50f6fcae17fdcbbcad16227519e5d02 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 19 Oct 2017 13:25:02 -0400 Subject: Add Functor Bag instance --- compiler/utils/Bag.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/utils') diff --git a/compiler/utils/Bag.hs b/compiler/utils/Bag.hs index a027db23b7..af5caadb24 100644 --- a/compiler/utils/Bag.hs +++ b/compiler/utils/Bag.hs @@ -330,5 +330,8 @@ instance Data a => Data (Bag a) where dataTypeOf _ = mkNoRepType "Bag" dataCast1 x = gcast1 x +instance Functor Bag where + fmap = mapBag + instance Foldable.Foldable Bag where foldr = foldrBag -- cgit v1.2.1