Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  confusion over yesod-forms-0.2.0 (Michael Litchard)
   2. Re:  confusion over yesod-forms-0.2.0 (Michael Litchard)
   3.  cabal and dependencies (Manfred Lotz)
   4. Re:  cabal and dependencies (Andres Loeh)


----------------------------------------------------------------------

Message: 1
Date: Wed, 22 Jun 2011 18:52:33 -0700
From: Michael Litchard <[email protected]>
Subject: [Haskell-beginners] confusion over yesod-forms-0.2.0
To: [email protected], web-devel <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

I installed the new yesod-forms-0.2.0
I tried out the sample program hello-forms.hs. The new changes work
just fine. No problems. I don't understand some of the notation, but
that didn't stop me from using yesod-form prior to the changes. I
copied the style of hello-form
exactly, I think. But I got a compile error. I don't think the error
indicates the actual problem, and I suspect I have left out something.
Below is a link to hello-form, the code I am trying to compile and the
error I get. I would appreciate any insight offered.

hello-forms.hs
http://hpaste.org/48177

Handler/SSLvpn.hs
http://hpaste.org/48178

error

Handler/SSLvpn.hs:43:14:
    No instance for (RenderMessage Aframe FormMessage)
      arising from a use of `selectField'
    Possible fix:
      add an instance declaration for (RenderMessage Aframe FormMessage)
    In the first argument of `areq', namely `(selectField tests)'
    In the second argument of `(<*>)', namely
      `areq (selectField tests) "Pick a test" Nothing'
    In the second argument of `($)', namely
      `pure (,)
     <*>
       areq (multiSelectField servers) "Pick some servers" Nothing
   <*>
     areq (selectField tests) "Pick a test" Nothing'



------------------------------

Message: 2
Date: Wed, 22 Jun 2011 19:24:14 -0700
From: Michael Litchard <[email protected]>
Subject: Re: [Haskell-beginners] confusion over yesod-forms-0.2.0
To: [email protected], web-devel <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

In this case the error was straightforwardly indicating the problem
and is now fixed. Derp.

On Wed, Jun 22, 2011 at 6:52 PM, Michael Litchard <[email protected]> wrote:
> I installed the new yesod-forms-0.2.0
> I tried out the sample program hello-forms.hs. The new changes work
> just fine. No problems. I don't understand some of the notation, but
> that didn't stop me from using yesod-form prior to the changes. I
> copied the style of hello-form
> exactly, I think. But I got a compile error. I don't think the error
> indicates the actual problem, and I suspect I have left out something.
> Below is a link to hello-form, the code I am trying to compile and the
> error I get. I would appreciate any insight offered.
>
> hello-forms.hs
> http://hpaste.org/48177
>
> Handler/SSLvpn.hs
> http://hpaste.org/48178
>
> error
>
> Handler/SSLvpn.hs:43:14:
> ? ?No instance for (RenderMessage Aframe FormMessage)
> ? ? ?arising from a use of `selectField'
> ? ?Possible fix:
> ? ? ?add an instance declaration for (RenderMessage Aframe FormMessage)
> ? ?In the first argument of `areq', namely `(selectField tests)'
> ? ?In the second argument of `(<*>)', namely
> ? ? ?`areq (selectField tests) "Pick a test" Nothing'
> ? ?In the second argument of `($)', namely
> ? ? ?`pure (,)
> ? ? <*>
> ? ? ? areq (multiSelectField servers) "Pick some servers" Nothing
> ? <*>
> ? ? areq (selectField tests) "Pick a test" Nothing'
>



------------------------------

Message: 3
Date: Thu, 23 Jun 2011 10:08:15 +0200
From: Manfred Lotz <[email protected]>
Subject: [Haskell-beginners] cabal and dependencies
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

Hi there,
I had something like this before but now I checked explicitly:



I did 'ghc-pkg check' which showed nothing. Fine!

Then I did 'cabal install gitit' and after successfully installing gitit
I ran 'ghc-pkg check' again and got:


There are problems in package yesod-form-0.1.0.1:
  dependency "xss-sanitize-0.2.6-bfb18d04010fadbceea5ba5136c33373"
doesn't exist There are problems in package warp-0.4.0.1:
  dependency "sendfile-0.7.3-1d8424f5c18454ab33888680f53a7340" doesn't
exist There are problems in package happstack-state-6.0.0:
  dependency "hslogger-1.1.4-d65ba05b9e69912e34b53b6153cc40ff" doesn't
exist There are problems in package happstack-jmacro-6.0.0:
  dependency "happstack-server-6.1.3-8a8613c407db656b76de3be81e531fb5"
doesn't exist

The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
yesod-form-0.1.0.1
warp-0.4.0.1
happstack-state-6.0.0
happstack-jmacro-6.0.0
yesod-0.8.2.1
yesod-auth-0.4.0.2


For example, hslogger was reinstalled for some reason and got a new id.
Now it is hslogger-1.1.4-dff59692d8bdac1df0c425c217a20b0c.conf

Why is this happening? Could I prevent it somehow?



-- 
Manfred





------------------------------

Message: 4
Date: Thu, 23 Jun 2011 11:46:12 +0200
From: Andres Loeh <[email protected]>
Subject: Re: [Haskell-beginners] cabal and dependencies
To: Manfred Lotz <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hi Manfred.

> I did 'ghc-pkg check' which showed nothing. Fine!
>
> Then I did 'cabal install gitit' and after successfully installing gitit
> I ran 'ghc-pkg check' again and got:

[lots of broken packages deleted]

Yes. That can happen with current cabal-install.

> Why is this happening?

The dependency resolution algorithm will try to make a consistent
install plan that allows gitit to be run. However, in order to achieve
that, it may decide that it's necessary to reinstall some existing
packages in a new configuration (with other dependency or flag
settings). Such reinstalls will then overwrite the previous package in
the store, and if that previous package was depended on by something
else, these other things will break.

While ghc-pkg currently allows both foo-1.0 and foo-2.0 to be in the
store at the same time, it doesn't allow two different configurations
of foo-2.0 in the store at the same time.

> Could I prevent it somehow?

Currently, you can only discover the danger of this happening in
advance: You can run "cabal install --dry-run -v gitit", and then
you'll get an annotated install plan printed out. If you notice lines
like

HTTP-4000.1.1 (reinstall) changes: network-2.3.0.2 -> 2.2.1.10

then you are in danger. If you only see lines that say "(new package)"
or "(new version)", you're safe.

In the new dependency resolver I'm currently implementing for Cabal,
which you can preview at

  http://darcs.haskell.org/cabal-branches/cabal-modular-solver/

there will be an option "--avoid-reinstalls" that tries to avoid
reinstalls (but perhaps at the cost of selecting older versions of
certain packages to avoid them). Also, the next release of Cabal will
probably add a warning if an install plan contains reinstalls.

The proper solution would be to lift the limitation in the GHC package
store and allow arbitrarily many variants of packages to coexist
peacefully, so that even a "reinstall" won't have to remove an old
version. I hope we're getting around to implement this sooner or
later.

Cheers,
  Andres



------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 36, Issue 57
*****************************************

Reply via email to