byorgey / BlogLiterately

Command-line tool for formatting and publishing blog posts.
GNU General Public License v3.0
19 stars 4 forks source link

0.8.7 Fails to Build #41

Closed idontgetoutmuch closed 3 years ago

idontgetoutmuch commented 3 years ago
Preprocessing library for BlogLiterately-0.8.7..
Building library for BlogLiterately-0.8.7..
[ 1 of 12] Compiling Paths_BlogLiterately ( dist/build/autogen/Paths_BlogLiterately.hs, dist/build/Paths_BlogLiterately.o )
[ 2 of 12] Compiling Text.BlogLiterately.Block ( src/Text/BlogLiterately/Block.hs, dist/build/Text/BlogLiterately/Block.o )

src/Text/BlogLiterately/Block.hs:48:58: error:
    • Couldn't match type ‘[Char]’ with ‘Text’
      Expected type: [Text]
        Actual type: [String]
    • In the second argument of ‘($)’, namely ‘as’
      In the second argument of ‘map’, namely ‘(maybe id (:) tag $ as)’
      In the second argument of ‘elem’, namely
        ‘map T.toLower (maybe id (:) tag $ as)’
   |
48 |   | T.toLower t `elem` map T.toLower (maybe id (:) tag $ as)
   |                                                          ^^

src/Text/BlogLiterately/Block.hs:51:28: error:
    • Couldn't match type ‘[Char]’ with ‘Text’
      Expected type: Text
        Actual type: String
    • In the first argument of ‘unTag’, namely ‘s’
      In the expression: unTag s
      In a pattern binding: (tag, src) = unTag s
   |
51 |   where (tag, src) = unTag s
   |                            ^
byorgey commented 3 years ago

Yikes, thanks for the report! I'll look into this. How were you building it? Via cabal? stack? Something else? And what version of GHC were you using?

idontgetoutmuch commented 3 years ago

@byorgey I will look at it - it's probably something I am doing but it's very odd

byorgey commented 3 years ago

@idontgetoutmuch any additional info you can provide? I just tried re-downloading BlogLiterately from Hackage and building using cabal build and GHC-8.8.1, and I was not able to reproduce this error.

idontgetoutmuch commented 3 years ago

I have

bash-3.2$ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.03.tar.gz shell.nix
error: Package ‘BlogLiterately-0.8.6.3’ in /nix/store/cg33qx5fdfm05y98jm4ihfblssdghdbb-20.03.tar.gz/pkgs/development/haskell-modules/hackage-packages.nix:2038 is marked as broken, refusing to evaluate.

I then tried to build it myself via nix at some reasonably current version of the main nix repo. I'll report back on my attempt when it finishes building.

idontgetoutmuch commented 3 years ago

Weirdly that built - I might have done a pull on nixpkgs so it is now more recent. Thanks for taking the time.

byorgey commented 3 years ago

OK, no worries, glad it builds now!