saep / repo-based-blog

Library for embedding a blog whose content is stored in a repository.
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

"cabal install" failed,how to fix it? #17

Open luckypoem opened 7 years ago

luckypoem commented 7 years ago

hi,

root@AR:/usr/local/repo-based-blog# cabal install

it shows: ... Building repo-based-blog-0.0.1... Preprocessing library repo-based-blog-0.0.1... [12 of 17] Compiling Web.RBB.Templates.Default ( library/Web/RBB/Templates/Default.hs, dist/dist-sandbox-76b93484/build/Web/RBB/Templates/Default.o )

library/Web/RBB/Templates/Default.hs:41:17: error: • Couldn't match type ‘UTCTime’ with ‘[Char]’ Expected type: UTCTime -> Text Actual type: String -> Text • In the expression: pack . formatTime defaultTimeLocale In an equation for ‘timeFormatter’: timeFormatter = pack . formatTime defaultTimeLocale

library/Web/RBB/Templates/Default.hs:41:24: error: • Couldn't match type ‘t0 -> String’ with ‘[Char]’ Expected type: String -> String Actual type: String -> t0 -> String • Probable cause: ‘formatTime’ is applied to too few arguments In the second argument of ‘(.)’, namely ‘formatTime defaultTimeLocale’ In the expression: pack . formatTime defaultTimeLocale In an equation for ‘timeFormatter’: timeFormatter = pack . formatTime defaultTimeLocale cabal: Leaving directory '.' cabal: Error: some packages failed to install: repo-based-blog-0.0.1 failed during the building phase. The exception was: ExitFailure 1 root@AR:/usr/local/repo-based-blog#

saep commented 7 years ago

I haven't touched this repository for 2 years. Some updates to the base library or library this project depends on has changed.

I'm going to make it build with a recent stackage snapshot.

saep commented 7 years ago

I created a stack.yaml file with the needed entries and fixed alle the compilation errors I had when I tried to build it. If you pull the current version from git it should just work(tm).

luckypoem commented 7 years ago

hi.

i recloned ur repo,and ran "stack build",i got: ... Linking .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/rbb/rbb ... repo-based-blog-0.0.2: copy/register Installing library in /usr/local/repo-based-blog/.stack-work/install/i386-linux/lts-7.9/8.0.1/lib/i386-linux-ghc-8.0.1/repo-based-blog-0.0.2-Ay2FUotqNnPGqs17d9h3dA Installing executable(s) in /usr/local/repo-based-blog/.stack-work/install/i386-linux/lts-7.9/8.0.1/bin Registering repo-based-blog-0.0.2... Completed 24 action(s). root@AR:/usr/local/repo-based-blog#

root@AR:/usr/local/repo-based-blog# .stack-work/dist/i386-linux/Cabal-1.24.0.0/build/rbb/rbb build

You do not seem to have configured your web site at all!

As you should decide how your site is going to look like, the default configuration does not do anything other than printing this help text.

To get you started on creating your own website with haskell and this blogging library, check out the documentation on github: https://github.com/saep/repo-based-blog root@AR:/usr/local/repo-based-blog#

in readme,u said "The Haddock documentation of the module Web.RBB should contain enough information to get started", where is The Haddock documentation of the module Web.RBB??

thank u

saep commented 7 years ago

https://hackage.haskell.org/package/repo-based-blog-0.0.1/docs/Web-RBB.html

luckypoem commented 7 years ago

hi.

the content of https://hackage.haskell.org/package/repo-based-blog-0.0.1/docs/Web-RBB.html is too complex.i don't know how to get started.

could u pls write a detailed guide of how to setup a blog using rbb?

thank u very much.