I need a library to encode data in cp1251 to work with an api which use it.
I found only 2 libs for this purpose. The encoding lib and text-icu lib. The first one looks better just because it can be statically linked to my program.
But I can't even compile it! I am using stack so I add encoding
to build-deps in my .cabal file, and then stack solver update my stack yaml file with encoding-0.8 in extra-deps.
but after running stack build
I a got an error
Data/Encoding/Preprocessor/XMLMapping.hs:11:8:
Could not find module ‘Text.XML.HaXml.Types’
Use -v to see a list of the files searched for.
Data/Encoding/Preprocessor/XMLMappingBuilder.hs:15:8:
Could not find module ‘Text.XML.HaXml.OneOfN’
Use -v to see a list of the files searched for.
Data/Encoding/Preprocessor/XMLMappingBuilder.hs:16:8:
Could not find module ‘Text.XML.HaXml.XmlContent’
Use -v to see a list of the files searched for.
I tried to use older version of HaXml and encoding but got the same error.
For example I tried to use encoding-0.6.7
with HaXml-1.22.3
, after reading changelog https://hackage.haskell.org/package/encoding-0.7.0.2/changelog but got the same error.
In hackage documentation all this modules which encoding can't import exists.
How can I compile this lib? I am using stack 1.0.4, lts-5.6 and ghc-7.10.3 on linux mint x64
stack.yaml
flags: {}
extra-package-dbs: []
packages:
- '.'
extra-deps:
- encoding-0.8
- text-1.2.2.0
resolver: lts-5.6
cabal:
name: hapidry
version: 0.1.1.0
synopsis: Initial project template from stack
description: Please see README.md
homepage: -
license: GPL-2
license-file: LICENSE
author: -
maintainer: -
copyright: GPL
category: network
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
library
hs-source-dirs: src
exposed-modules: Lib
build-depends: base >= 4.7 && < 5
default-language: Haskell2010
executable hapidry-exe
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, hapidry
, wreq
, ConfigFile
, aeson
, lens
, cryptohash
, binary
, mtl
, base16-bytestring
, bytestring
, containers
, text
, lens-aeson
, data-default
, optparse-applicative
, encoding
default-language: Haskell2010
test-suite hapidry-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, hapidry
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
source-repository head
type: git
location: -
cabal
file andstack.yaml
file – epsilonhalbe