numerals
numerals copied to clipboard
Installation with cabal fails
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.
I just uploaded version 0.4.1 which should build. Can you verify if this solves your problem?
Although installation started working, I encountered new problems.
-
Readme in examples gives:
import qualified Text.Numeral.Language.EN as EN
, which should beimport qualified Text.Numeral.Language.ENG as ENG
(EN -> ENG) -
Readme in examples gives:
EN.uk_cardinal defaultInflection 123 :: Maybe Text
, which should beENG.gb_cardinal defaultInflection 123 :: Maybe Text
(EN -> ENG, uk -> gb) -
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.
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!
I created PR fixing not working examples in README #21.