Skip to content

Commit da0fb19

Browse files
committed
Qualify List.foldr in defaultPutList for MicroHs compatibility
MicroHs 0.17.3.0 re-exports Data.List.foldr from Prelude separately from Foldable(..), so 'import Prelude hiding (Foldable(..))' + 'import Data.Foldable (Foldable(..))' leaves unqualified 'foldr' ambiguous between Data.List.foldr and Data.Foldable.foldr. Qualify foldr as List.foldr in defaultPutList (matching List.length on the same line). Assisted-By: Antigravity (Gemini 4)
1 parent 5a567d2 commit da0fb19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/Data/Binary/Class.hs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class Binary t where
189189

190190
{-# INLINE defaultPutList #-}
191191
defaultPutList :: Binary a => [a] -> Put
192-
defaultPutList xs = put (List.length xs) <> putBuilder (foldr (\x acc -> let b = execPut (put x) in b `seq` (b <> acc)) mempty xs)
192+
defaultPutList xs = put (List.length xs) <> putBuilder (List.foldr (\x acc -> let b = execPut (put x) in b `seq` (b <> acc)) mempty xs)
193193

194194
#ifdef HAS_GENERICALLY
195195
instance (Generic a, GBinaryPut (Rep a), GBinaryGet (Rep a)) => Binary (Generically a) where

0 commit comments

Comments
 (0)