Skip to content

Commit

Permalink
Fix compilation with GHC 9.0 (#40)
Browse files Browse the repository at this point in the history
See https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.0#simplified-subsumption
for the required eta-expansion in lensWithDefault'

Hiding singleton from BasePrelude gives a warning for previous GHC versions,
but this is a minor issue
  • Loading branch information
39aldo39 committed Dec 16, 2021
1 parent 725bf5b commit fee9bde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ lensWithDefault guess setter getter f x =
(\y setter (Just y) x) <$> f (fromMaybe (guess x) (getter x))

lensWithDefault' α (Maybe α σ σ) (σ Maybe α) Lens' σ α
lensWithDefault' = lensWithDefault const
lensWithDefault' x = lensWithDefault (const x)

(!?) [α] Int Maybe α
(!?) xs i =
Expand Down
2 changes: 1 addition & 1 deletion src/WithPlus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module WithPlus
, parseString
) where

import BasePrelude hiding (toList, fromList)
import BasePrelude hiding (toList, fromList, singleton)
import Prelude.Unicode
import Data.Monoid.Unicode ((∅))
import Util (HumanReadable, split)
Expand Down

0 comments on commit fee9bde

Please sign in to comment.