Options.Applicative, (<>) and a class of type Monoid

I learned about Haskell. I am importing a module Options.Applicative, for example:

import Options.Applicative ((<>), Parser)
import qualified Options.Applicative as P

However this returns

Module ‘Options.Applicative’ does not export ‘(<>)’

What is wrong with that? This documentation suggests that this should be possible.

+4
source share
2 answers

You need to import (<>)from Data.Monoidor Data.Semigroup, since Options.Applicativeit does not actually re-export it . A quick way to verify that checking the "<" page in the documentation index , which will include (<>)if it has been re-exported.

PS: readme Hackage , GitHub, , .

+7

(<>) Data.Monoid, Options.Applicative. infix mappend.

+7

Source: https://habr.com/ru/post/1669084/


All Articles