numerals icon indicating copy to clipboard operation
numerals copied to clipboard

Installation with cabal fails

Open JMendyk opened this issue 8 years ago • 4 comments

Installation with cabal fails with error:

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: numerals-0.4 (user goal)
next goal: base (dependency of numerals-0.4)
rejecting: base-4.8.2.0/installed-a3c... (conflict: numerals => base>=3.0.3.1 && <4.7)
rejecting: base-4.9.0.0, 4.8.2.0, 4.8.1.0, 4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint requires installed instance)
Dependency tree exhaustively searched.

Apparently numerals-0.4 require base to be not newer than 4.7, however currently the newest version of base is 4.9.

Edit: After checking numerals repository, I found out that there has been no new release after 0.4, which makes numerals-0.4 in cabal highly obsolete compared to numerals master branch.

JMendyk avatar Dec 27 '16 08:12 JMendyk

I just uploaded version 0.4.1 which should build. Can you verify if this solves your problem?

roelvandijk avatar Dec 27 '16 14:12 roelvandijk

Although installation started working, I encountered new problems.

  1. Readme in examples gives: import qualified Text.Numeral.Language.EN as EN, which should be import qualified Text.Numeral.Language.ENG as ENG (EN -> ENG)

  2. Readme in examples gives: EN.uk_cardinal defaultInflection 123 :: Maybe Text, which should be ENG.gb_cardinal defaultInflection 123 :: Maybe Text (EN -> ENG, uk -> gb)

  3. With only these two lines I get error:

<interactive>:6:17: Not in scope: ‘defaultInflection’
<interactive>:6:48: Not in scope: type constructor or class ‘Text’

I add import import Text.Numeral.Grammar.Reified ( defaultInflection ), which adds new error, namely:

<no location info>:
    Could not find module ‘Text.Numeral.Grammar.Reified’
    It is not a module in the current program, or in any known package.

After briefly searching source code of numerals on GitHub I decide to change import statement into import Text.Numeral.Grammar( defaultInflection ) (removed: Reified), which thankfully works. Finally I import Data.Text and ENG.gb_cardinal defaultInflection 123 :: Maybe Text starts working.

I'll try to create Pull-Request with these issues fixed so that Examples in Readme work without problems.

JMendyk avatar Dec 27 '16 18:12 JMendyk

Thank you for mentioning these issues. There was a large refactoring and evidently I missed some things, mainly everything not checked by the typechecker...

Pull requests are very welcome!

roelvandijk avatar Dec 27 '16 18:12 roelvandijk

I created PR fixing not working examples in README #21.

JMendyk avatar Dec 27 '16 21:12 JMendyk