Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small-blog does not build as advertised #1

Closed
bjornbm opened this issue Jun 23, 2011 · 8 comments
Closed

small-blog does not build as advertised #1

bjornbm opened this issue Jun 23, 2011 · 8 comments

Comments

@bjornbm
Copy link
Contributor

bjornbm commented Jun 23, 2011

Building the small-blog executable using

ghc --make hakyll.hs

per the documentation results in

Hakyll.hs:2:8:
    File name does not match module name:
    Saw: `Main'
    Expected: `Hakyll'

. If I am analysing the situation correctly the import Hakyll statement in hakyll.hs causes a circular dependency on the hakyll.hs file rather than importing the Hakyll module from the hakyll package as intended. A workaround is to compile hakyll.hs from outside the small-blog directory:

ghc --make small-blog/hakyll.hs

but I would argue that renaming hakyll.hs to e.g. small-blog.hs will be less confusing to users.

@jaspervdj
Copy link
Owner

This issue should only appear on case-insensitive file systems. Nevertheless, it needs fixing. I'll rename the hakyll.hs file.

jaspervdj added a commit that referenced this issue Jun 23, 2011
Rename hakyll.hs to small-blog.hs. Fixes issue #1.
@bdarcus
Copy link

bdarcus commented Jul 8, 2012

Don't know if this should be a new issue, but ...


$ ghc --make small-blog.hs 
[1 of 1] Compiling Main             ( small-blog.hs, small-blog.o )

small-blog.hs:8:17:
    Couldn't match expected type `RulesM a0'
                with actual type `hakyll-3.2.8.1:Hakyll.Core.Rules.Internal.RulesM
                                    ()'
    Expected type: RulesM a0
      Actual type: hakyll-3.2.8.1:Hakyll.Core.Rules.Internal.Rules
    In the return type of a call of `smallBlogWith'
    In the second argument of `($)', namely
      `smallBlogWith
         (defaultSmallBlogConfiguration
            {atomFeed = Just
                          (FeedConfiguration
                             {feedTitle = "A simple blog",
                              feedDescription = "Certainly very enjoyable yes",
                              feedAuthorName = "Jasper Van der Jeugt",
                              feedRoot = "http://example.com"})})'

@jaspervdj
Copy link
Owner

@bdarcus Your issue is caused by the fact that you

  1. Installed hakyll-3.2.8.1
  2. Installed hakyll-contrib, compiled using the previously installed hakyll-3.2.8.1
  3. Installed a newer hakyll which GHC tries to use, but can't with your hakyll-contrib installation

Reinstalling hakyll-contrib should fix this.

@bdarcus
Copy link

bdarcus commented Jul 8, 2012

I don't believe I did do #3. In any case, reinstalling hakyll-contrib
didn't solve it.

On Sun, Jul 8, 2012 at 4:56 PM, Jasper Van der Jeugt
reply@reply.github.com
wrote:

@bdarcus Your issue is caused by the fact that you

  1. Installed hakyll-3.2.8.1
  2. Installed hakyll-contrib, compiled using the previously installed hakyll-3.2.8.1
  3. Installed a newer hakyll which GHC tries to use, but can't with your hakyll-contrib installation

Reinstalling hakyll-contrib should fix this.


Reply to this email directly or view it on GitHub:
#1 (comment)

@jaspervdj
Copy link
Owner

Hmm, okay, could you drop the output of ghc-pkg list | grep hakyll somewhere?

@bdarcus
Copy link

bdarcus commented Jul 8, 2012

https://gist.github.com/3073074

On Sun, Jul 8, 2012 at 5:41 PM, Jasper Van der Jeugt
reply@reply.github.com
wrote:

Hmm, okay, could you drop the output of ghc-pkg list | grep hakyll somewhere?


Reply to this email directly or view it on GitHub:
#1 (comment)

@jaspervdj
Copy link
Owner

Thanks! Seems like hakyll-contrib had a too strict dependency on hakyll. I've fixed this and uploaded hakyll-contrib-0.1.0.1 to Hackage, so doing cabal update followed by cabal install hakyll-contrib-0.1.0.1 should fix the issue.

@bdarcus
Copy link

bdarcus commented Jul 8, 2012

That fixed it. Thanks.

On Sun, Jul 8, 2012 at 6:00 PM, Jasper Van der Jeugt
reply@reply.github.com
wrote:

Thanks! Seems like hakyll-contrib had a too strict dependency on hakyll. I've fixed this and uploaded hakyll-contrib-0.1.0.1 to Hackage, so doing cabal update followed by cabal install hakyll-contrib-0.1.0.1 should fix the issue.


Reply to this email directly or view it on GitHub:
#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants