blob: de29549f3a124c1268e6d9210b7f117e8165827a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
From https://github.com/quchen/pgp-wordlist/commit/214304abc2b9b1213e6ea0f4bcc6f0b8033ada22
From: Topsii <tobiashaslop@hotmail.de>
Date: Mon, 17 Oct 2022 23:51:27 +0200
Subject: [PATCH] Add missing Functor instance for AltList
Adresses haskell/core-libraries-committee#91
--- a/src/Data/Text/PgpWordlist/Internal/AltList.hs
+++ b/src/Data/Text/PgpWordlist/Internal/AltList.hs
@@ -81,7 +81,8 @@ bimap :: (a -> a') -> (b -> b') -> AltList a b -> AltList a' b'
bimap _ _ Nil = Nil
bimap f g (x :<> xs) = f x :<> bimap g f xs
-
+instance Functor (AltList a) where
+ fmap = second
#if MIN_VERSION_base(4,8,0)
instance Bi.Bifunctor AltList where
|