cies / htoml

TOML file format parser in Haskell
https://hackage.haskell.org/package/htoml
Other
38 stars 13 forks source link

fails to install with stackage lts-3.0 / ghc 7.10 #5

Closed simonmichael closed 8 years ago

simonmichael commented 9 years ago

This package looks useful, thanks. stack install failed for me:

$ stack install htoml 
unbounded-delays-0.1.0.9: configure
logict-0.6.0.2: download
regex-tdfa-rc-1.1.8.3: download
unbounded-delays-0.1.0.9: build
logict-0.6.0.2: configure
logict-0.6.0.2: build
regex-tdfa-rc-1.1.8.3: configure
unbounded-delays-0.1.0.9: install
regex-tdfa-rc-1.1.8.3: build
logict-0.6.0.2: install
smallcheck-1.1.1: download
smallcheck-1.1.1: configure
smallcheck-1.1.1: build
smallcheck-1.1.1: install
regex-tdfa-rc-1.1.8.3: install
tasty-0.10.1.2: download
tasty-0.10.1.2: configure
tasty-0.10.1.2: build
tasty-0.10.1.2: install
tasty-hunit-0.9.2: download
tasty-hunit-0.9.2: configure
tasty-quickcheck-0.8.3.2: download
tasty-smallcheck-0.8.0.1: download
tasty-hunit-0.9.2: build
tasty-quickcheck-0.8.3.2: configure
tasty-hunit-0.9.2: install
tasty-quickcheck-0.8.3.2: build
tasty-smallcheck-0.8.0.1: configure
tasty-smallcheck-0.8.0.1: build
tasty-quickcheck-0.8.3.2: install
tasty-smallcheck-0.8.0.1: install
tasty-hspec-1.1: download
tasty-hspec-1.1: configure
tasty-hspec-1.1: build
tasty-hspec-1.1: install
htoml-0.1.0.2: download
htoml-0.1.0.2: configure
htoml-0.1.0.2: build
Completed all 10 actions.

--  While building package htoml-0.1.0.2 using:
      /Users/simon/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build --ghc-options  -ddump-hi -ddump-to-file
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/simon/src/hledger/.stack-work/logs/htoml-0.1.0.2.log

    Configuring htoml-0.1.0.2...
    Building htoml-0.1.0.2...
    Preprocessing library htoml-0.1.0.2...
    [1 of 3] Compiling Text.Toml.Types  ( src/Text/Toml/Types.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Text/Toml/Types.o )
    [2 of 3] Compiling Text.Toml.Parser ( src/Text/Toml/Parser.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Text/Toml/Parser.o )

    src/Text/Toml/Parser.hs:83:5:
        Non type-variable argument in the constraint: Stream s m Char
        (Use FlexibleContexts to permit this)
        When checking that ‘twoChar’ has the inferred type
          twoChar :: forall s u (m :: * -> *).
                     Stream s m Char =>
                     Char -> ParsecT s u m [Char]
        In an equation for ‘tableArrayHeader’:
            tableArrayHeader
              = between (twoChar '[') (twoChar ']') headerValue
              where
                  twoChar c = count 2 (char c)

    src/Text/Toml/Parser.hs:177:25:
        Couldn't match expected type ‘time-1.5.0.1:Data.Time.Format.Locale.TimeLocale’
                    with actual type ‘System.Locale.TimeLocale’
        NB: ‘time-1.5.0.1:Data.Time.Format.Locale.TimeLocale’
              is defined in ‘Data.Time.Format.Locale’ in package ‘time-1.5.0.1’
            ‘System.Locale.TimeLocale’
              is defined in ‘System.Locale’ in package ‘old-locale-1.0.0.7’
        In the first argument of ‘parseTime’, namely ‘defaultTimeLocale’
        In the expression:
          parseTime defaultTimeLocale (iso8601DateFormat $ Just "%X") d
cgag commented 8 years ago

Just ran into the same thing. It looks like master fixes this. To work around this using stack I:

Forked this version: https://github.com/HuwCampbell/htoml.
Made a dir in my project called "forks" Cloned my fork into it. Merged the toml4 branch into master Added 'forks/toml' to the packages list in stack.yaml

Building works. I haven't tested it throrougly enough to say if anything is broken but it seems to be handling my simple use cases.

thumphries commented 8 years ago

@cies any chance of a hackage upload for 0.1.0.3?

cies commented 8 years ago

Sorry guys for not replying earlier. I totally must have forgotten about the 0.1.0.3 release, I'll upload it to Hackage soon.

I'm also much interested in bringing the changes of @HuwCampbell back into master. @HuwCampbell, could you please elaborate on the state of your toml4 branch?

edit: Sorry did not see the PRs; looking in to that shortly.

cies commented 8 years ago

Hackage upload is done: https://hackage.haskell.org/package/htoml

thumphries commented 8 years ago

thanks @cies!