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. Re: [web-devel] yesod dependency hell (Haisheng Wu)
2. Re: [web-devel] yesod dependency hell (Michael Snoyman)
3. Re: a problem with maps (Julian Porter)
----------------------------------------------------------------------
Message: 1
Date: Sun, 24 Jul 2011 20:46:58 +0800
From: Haisheng Wu <[email protected]>
Subject: Re: [Haskell-beginners] [web-devel] yesod dependency hell
To: Michael Litchard <[email protected]>
Cc: [email protected], Thomas Hartman
<[email protected]>
Message-ID:
<CAFj8LZfgpsCFEZbmjytzTzaO35UZccCpa=agvfbxos7wp9q...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I think I experience similar situation.
I did some change to yesod-auth-0.4.x (Im using yesod-0.8.x which needs
yesod-auth-0.4.x) locally but it failed to compile because of dependences.
Then I change my idea to make change its low level package authenticate.
authenticate compile successfully but failed to rebuild yesod itself.
Basically I spend more than half day trying to "Apply" my change which is
only one line added.
However, till now, I have no lucky.
I'm wondering any best practice of Cabal for such scenario.
Am I doing something wrong?
I really expect a simple and elegant way.~
Appreciate your help.
-Haisheng
On Thu, Jun 23, 2011 at 6:19 AM, Michael Litchard <[email protected]>wrote:
> The solution seems to be to remove yesod from the build-depends
> section. I'm having other problems, don't think it's related.
>
> On Wed, Jun 22, 2011 at 2:52 PM, Michael Litchard <[email protected]>
> wrote:
> > Thomas,
> > I tried what you suggested and I still have the exact same
> problem.
> >
> > On Wed, Jun 22, 2011 at 1:50 PM, Michael Litchard <[email protected]>
> wrote:
> >> My thinking is that this problem comes up anytime someone wants to
> >> play around with experimental code. As evidenced by the
> >> yesodwiki.cabal file, I think there's a more straightforward solution.
> >> I'm just not seeing it.
> >>
> >> On Wed, Jun 22, 2011 at 1:46 PM, Thomas Hartman
> >> <[email protected]> wrote:
> >>> one idea: move .ghc and .cabal to temp directory.
> >>>
> >>> start over with a clean slate.
> >>>
> >>> On Wed, Jun 22, 2011 at 1:30 PM, Michael Litchard <[email protected]>
> wrote:
> >>>> Configuring Aframe-0.0.1...
> >>>> Warning: This package indirectly depends on multiple versions of the
> same
> >>>> package. This is highly likely to cause a compile failure.
> >>>> package yesod-auth-0.4.0.2 requires yesod-form-0.1.0.1
> >>>> package yesod-0.8.2.1 requires yesod-form-0.1.0.1
> >>>> package Aframe-0.0.1 requires yesod-form-0.2.0
> >>>>
> >>>> I specified in Aframe.cabal yesod-form 0.2.0. The above warning is
> >>>> what I was looking to avoid. What is the solution to this problem? I
> >>>> could not find an obvious solution in yesodwiki.cabal, even though I
> >>>> see it's doing something similar to what I want. How did you deal with
> >>>> the above warning message?
> >>>>
> >>>> On Wed, Jun 22, 2011 at 12:32 PM, Michael Snoyman <
> [email protected]> wrote:
> >>>>> Have a look at the yesodwiki[1]; basically, you can't use the yesod
> >>>>> package itself, only the subpackages. This is by design so that a
> >>>>> single Yesod release will keep API stability, while users can still
> >>>>> experiment with newer versions of underlying packages.
> >>>>>
> >>>>> Michael
> >>>>>
> >>>>> [1]
> https://github.com/snoyberg/yesodwiki/blob/master/yesodwiki.cabal
> >>>>>
> >>>>> On Wed, Jun 22, 2011 at 10:29 PM, Michael Litchard <
> [email protected]> wrote:
> >>>>>> I need to use yesod-form 0.2.0. The problem is that the yesod
> package,
> >>>>>> and the yesod-auth package expect yesod-form to be 0.1.0*
> >>>>>> I tried changing the .cabal files but that breaks in ways that makes
> >>>>>> me think the fix is not so simple. How do I go about being able to
> use
> >>>>>> yesod-form 0.2.0
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> web-devel mailing list
> >>>>>> [email protected]
> >>>>>> http://www.haskell.org/mailman/listinfo/web-devel
> >>>>>>
> >>>>>
> >>>>
> >>>> _______________________________________________
> >>>> web-devel mailing list
> >>>> [email protected]
> >>>> http://www.haskell.org/mailman/listinfo/web-devel
> >>>>
> >>>
> >>
> >
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110724/c69b89fc/attachment-0001.htm>
------------------------------
Message: 2
Date: Sun, 24 Jul 2011 15:50:51 +0300
From: Michael Snoyman <[email protected]>
Subject: Re: [Haskell-beginners] [web-devel] yesod dependency hell
To: Haisheng Wu <[email protected]>
Cc: [email protected], Thomas Hartman
<[email protected]>
Message-ID:
<caka2jgk6603uz+mb2gas-hre_bwehv5tjr18uqfn1tbkywv...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
When I run into this problem, I've found the simplest solution is to
run a local Yackage server[1] that will keep my modified package. Then
cabal is able to still reinstall the package for you automatically.
[1] http://hackage.haskell.org/package/yackage
On Sun, Jul 24, 2011 at 3:46 PM, Haisheng Wu <[email protected]> wrote:
> I think I experience similar situation.
> I did some change to yesod-auth-0.4.x (Im using yesod-0.8.x which needs
> yesod-auth-0.4.x) locally but it failed to compile because of dependences.
> Then I change my idea to make change its low level package authenticate.
> authenticate compile successfully but failed to rebuild yesod itself.
>
> Basically I spend more than half day trying to "Apply" my change which is
> only one line added.
> However, till now, I have no lucky.
>
> I'm wondering any best practice of Cabal for such scenario.
> Am I doing something wrong?
>
> I really expect a simple and elegant way.~
> Appreciate your help.
>
> -Haisheng
>
>
> On Thu, Jun 23, 2011 at 6:19 AM, Michael Litchard <[email protected]>
> wrote:
>>
>> The solution seems to be to remove yesod from the build-depends
>> section. I'm having other problems, don't think it's related.
>>
>> On Wed, Jun 22, 2011 at 2:52 PM, Michael Litchard <[email protected]>
>> wrote:
>> > Thomas,
>> > ? ? ? ? ? ? I tried what you suggested and I still have the exact same
>> > problem.
>> >
>> > On Wed, Jun 22, 2011 at 1:50 PM, Michael Litchard <[email protected]>
>> > wrote:
>> >> My thinking is that this problem comes up anytime someone wants to
>> >> play around with experimental code. As evidenced by the
>> >> yesodwiki.cabal file, I think there's a more straightforward solution.
>> >> I'm just not seeing it.
>> >>
>> >> On Wed, Jun 22, 2011 at 1:46 PM, Thomas Hartman
>> >> <[email protected]> wrote:
>> >>> one idea: move .ghc and .cabal to temp directory.
>> >>>
>> >>> start over with a clean slate.
>> >>>
>> >>> On Wed, Jun 22, 2011 at 1:30 PM, Michael Litchard
>> >>> <[email protected]> wrote:
>> >>>> Configuring Aframe-0.0.1...
>> >>>> Warning: This package indirectly depends on multiple versions of the
>> >>>> same
>> >>>> package. This is highly likely to cause a compile failure.
>> >>>> package yesod-auth-0.4.0.2 requires yesod-form-0.1.0.1
>> >>>> package yesod-0.8.2.1 requires yesod-form-0.1.0.1
>> >>>> package Aframe-0.0.1 requires yesod-form-0.2.0
>> >>>>
>> >>>> I specified in Aframe.cabal yesod-form 0.2.0. The above warning is
>> >>>> what I was looking to avoid. What is the solution to this problem? I
>> >>>> could not find an obvious solution in yesodwiki.cabal, even though I
>> >>>> see it's doing something similar to what I want. How did you deal
>> >>>> with
>> >>>> the above warning message?
>> >>>>
>> >>>> On Wed, Jun 22, 2011 at 12:32 PM, Michael Snoyman
>> >>>> <[email protected]> wrote:
>> >>>>> Have a look at the yesodwiki[1]; basically, you can't use the yesod
>> >>>>> package itself, only the subpackages. This is by design so that a
>> >>>>> single Yesod release will keep API stability, while users can still
>> >>>>> experiment with newer versions of underlying packages.
>> >>>>>
>> >>>>> Michael
>> >>>>>
>> >>>>> [1]
>> >>>>> https://github.com/snoyberg/yesodwiki/blob/master/yesodwiki.cabal
>> >>>>>
>> >>>>> On Wed, Jun 22, 2011 at 10:29 PM, Michael Litchard
>> >>>>> <[email protected]> wrote:
>> >>>>>> I need to use yesod-form 0.2.0. The problem is that the yesod
>> >>>>>> package,
>> >>>>>> and the yesod-auth package expect yesod-form to be 0.1.0*
>> >>>>>> I tried changing the .cabal files but that breaks in ways that
>> >>>>>> makes
>> >>>>>> me think the fix is not so simple. How do I go about being able to
>> >>>>>> use
>> >>>>>> yesod-form 0.2.0
>> >>>>>>
>> >>>>>> _______________________________________________
>> >>>>>> web-devel mailing list
>> >>>>>> [email protected]
>> >>>>>> http://www.haskell.org/mailman/listinfo/web-devel
>> >>>>>>
>> >>>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> web-devel mailing list
>> >>>> [email protected]
>> >>>> http://www.haskell.org/mailman/listinfo/web-devel
>> >>>>
>> >>>
>> >>
>> >
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
------------------------------
Message: 3
Date: Sun, 24 Jul 2011 16:44:55 +0100
From: Julian Porter <[email protected]>
Subject: Re: [Haskell-beginners] a problem with maps
To: Haskell Beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"
Well, speaking of rigour, I don't think applicative functors, etc are actually
the right approach. Using the list monad gives a much clearer idea of what's
going on, plus it's massively generalisable.
See
http://jpembeddedsolutions.wordpress.com/2011/07/24/combining-haskell-lists-with-monads/
for a description.
Julian Porter
[email protected]
http://www.porternet.org
On 24 Jul 2011, at 01:13, aditya siram wrote:
> Ertugul,
> I admire your passion for rigor and discipline. It is not natural for
> me but I am slowly coming to the same place.
>
> I also feel that Haskell development is like learning to play music.
> I've seen many a student (myself included) turn away from an
> instrument because of an over-emphasis on scales, arpeggios etc. and
> less on playing what sounds good. It is true that eventually to play
> seriously some understanding of that theory is required but the
> musician will come to that conclusion on their own.
>
> They will hear a pattern over and over and wonder if it has a name -
> then you show them the major scale and it will all make sense because
> it will be a solution to a problem, not a solution waiting for a
> problem.
>
> In some ways I feel that the Haskell community because of their
> expertise and enthusiasm gives users answers to questions they haven't
> asked yet. When they do (inevitably) ask your awesome monad tutorial
> (which helped me a great deal) will be there.
>
> -deech
>
> On Sat, Jul 23, 2011 at 6:39 PM, Ertugrul Soeylemez <[email protected]> wrote:
>> David Place <[email protected]> wrote:
>>
>>>> Point taken, but to get serious with Haskell you will want to learn
>>>> applicative functors and at least the function arrow anyway.
>>>
>>> Interesting thoughts, Ertugrul. I would argue that you can get very
>>> serious with Haskell without understanding applicative functors and
>>> the function arrow. The very basic aspects of the language (the type
>>> system, higher-order functions, lazy evaluation, etc?) are already so
>>> powerful, that you really don't need to add complexity to simple
>>> programs by including some of the more obscure extensions. I could
>>> see if it made the code substantially more compact. In this case, it
>>> makes the code more verbose as you need to import the two modules to
>>> do something which can be so trivially expressed as an abstraction.
>>
>> Haskell application development is more than just the language. The
>> language itself is very powerful, yes, but serious applications I write
>> usually have quite a few dependencies. If you want to reinvent the
>> wheel for everything, then yes, I'm exaggerating. Personally I don't
>> want to, because there are great libraries and design patterns out
>> there, for which you simply need to understand more than just the
>> language.
>>
>> It's as simple as this: To get serious with Haskell, you need to
>> understand Haskell monads. Understanding them implies understanding
>> applicative functors (not necessarily the applicative style). For many
>> of the useful libraries you will want to go further and understand monad
>> transformers and more.
>>
>> I'm not talking about any ideals here. I'm talking about real world
>> application development, which is what I am doing.
>>
>>
>>> When you write a program, do you think of it as a document only for
>>> the compiler to understand, or might some other people need to
>>> understand it someday?
>>
>> "It"? For me type signatures are specification for the compiler and
>> documentation for humans, along with Haddock-style comments. My code is
>> usually very well documented. In most cases Haddock shows me a coverage
>> of 100% for all of my source files, and every top-level and
>> 'where'-definition has a type signature. I'm very rigorous here.
>>
>> All of the power I get from Haskell itself, the base library and the
>> many libraries I use I view as tools to get stuff done quickly, safely
>> and elegantly. As said, there is always a simpler way to write stuff,
>> but I have a certain style, which I follow consistently, and in that
>> style I write 'second pure'. That's it.
>>
>> Why not '(:[])'? Simply because I hate it and find it confusing. Why
>> not 'return'? Because I write my code reasonably general. Not that
>> using 'return' would change the type signature in question, but it is
>> just my style. In a do-block I use 'return'. Everywhere else I use
>> 'pure'. Consistently. Why 'second'? Because it's convenient.
>>
>>
>> Greets,
>> Ertugrul
>>
>>
>> --
>> nightmare = unsafePerformIO (getWrongWife >>= sex)
>> http://ertes.de/
>>
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110724/57e1481e/attachment.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 37, Issue 54
*****************************************