I am learning about Haskell. I am importing the Options.Applicative
module, like so:
import Options.Applicative ((<>), Parser)
import qualified Options.Applicative as P
However, this returns
Module ‘Options.Applicative’ does not export ‘(<>)’
What is wrong with this? This documentation suggests this should be possible.
You need to import (<>)
from either Data.Monoid
or Data.Semigroup
, as Options.Applicative
doesn't actually re-export it. A quick way to verify that is checking the "<" page in the documentation index, which would include (<>)
if it was re-exported.
P.S.: While the readme currently on Hackage is slightly misleading indeed, the missing import was already added upstream at GitHub, and so it will be fixed when the next version of the package is released.
(<>)
is in Data.Monoid, not Options.Applicative. It's an infix synonym for mappend
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With