Send Beginners mailing list submissions to
        beginners@haskell.org

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
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

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


Today's Topics:

   1. Re:  Happstack dependency problems (Tom Murphy)
   2. Re:  Happstack dependency problems (Antoine Latter)
   3. Re:  Happstack dependency problems (Antoine Latter)
   4. Re:  Happstack dependency problems (Tom Murphy)
   5. Re:  happstack versus yesod (Mats Rauhala)
   6. Re:  Tuples .vs Either Vs datatypes (Christian Maeder)


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

Message: 1
Date: Tue, 5 Apr 2011 22:15:51 -0400
From: Tom Murphy <amin...@gmail.com>
Subject: Re: [Haskell-beginners] Happstack dependency problems
To: Antoine Latter <aslat...@gmail.com>
Cc: beginners@haskell.org, Daniel Fischer
        <daniel.is.fisc...@googlemail.com>
Message-ID: <banlktik0nvswglsltcfj9hd8pyxjnt8...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

>
> > Aw, I should've used quotes or a separate line, the command is
> >
> > $ ghc-pkg check
> >
> > I meant: what does "ghc-pkg check" report.
> >
>
>

Nothing happened:
"
$ ghc-pkg check
$
"



> Maybe we can try to break the problem down into smaller pieces.
>
> Happstack is composed of multiple packages, and you could try them one
> at a time to narrow things down a bit:
>
> happstack-util
> happstack-data
> happstack-state
> happstack-ixset
> happstack-server
> happstack
>
> If you cabal install each one of the above in turn (and in order!) it
> will mimic "cabal install happstack" fairly well.
>
>
I get the "cannot configure unix" error for:
- happstack-util
- happstack-state
- happstack-ixset
- happstack-server
- happstack

In other words, everything except happstack-data.


Thanks for the help!
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110405/b6897821/attachment-0001.htm>

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

Message: 2
Date: Tue, 5 Apr 2011 22:00:55 -0500
From: Antoine Latter <aslat...@gmail.com>
Subject: Re: [Haskell-beginners] Happstack dependency problems
To: Tom Murphy <amin...@gmail.com>
Cc: beginners@haskell.org, Daniel Fischer
        <daniel.is.fisc...@googlemail.com>
Message-ID: <BANLkTinXTJSzS=12-ndtygw6edlplkk...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On Tue, Apr 5, 2011 at 9:15 PM, Tom Murphy <amin...@gmail.com> wrote:
>
> I get the "cannot configure unix" error for:
> - happstack-util
> -?happstack-state
> -?happstack-ixset
> -?happstack-server
> - happstack
> In other words, everything except happstack-data.
>

Well, happstack-util is a dependency for the rest of the packages you
listed, so you might be better off focusing your efforts there.

It requires unix-compat to build. What does "cabal install
unix-compat" give you?

If that's what's breaking you can try "cabal install
unix-compat-0.1.2.1" and then "cabal install happstack-util". Version
0.1.2.1 appears to be the most recent version of unix-compat that
doesn't specify version bounds on the unix package, which is what
you're having trouble with.

If it works let us know.

Antoine

> Thanks for the help!
> Tom



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

Message: 3
Date: Tue, 5 Apr 2011 22:03:36 -0500
From: Antoine Latter <aslat...@gmail.com>
Subject: Re: [Haskell-beginners] Happstack dependency problems
To: Tom Murphy <amin...@gmail.com>
Cc: beginners@haskell.org, Daniel Fischer
        <daniel.is.fisc...@googlemail.com>
Message-ID: <BANLkTi=n5frtyisbl4dargeyzhy9qaw...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On Tue, Apr 5, 2011 at 10:00 PM, Antoine Latter <aslat...@gmail.com> wrote:
> On Tue, Apr 5, 2011 at 9:15 PM, Tom Murphy <amin...@gmail.com> wrote:
>>
>> I get the "cannot configure unix" error for:
>> - happstack-util
>> -?happstack-state
>> -?happstack-ixset
>> -?happstack-server
>> - happstack
>> In other words, everything except happstack-data.
>>
>
> Well, happstack-util is a dependency for the rest of the packages you
> listed, so you might be better off focusing your efforts there.
>
> It requires unix-compat to build. What does "cabal install
> unix-compat" give you?
>
> If that's what's breaking you can try "cabal install
> unix-compat-0.1.2.1" and then "cabal install happstack-util". Version
> 0.1.2.1 appears to be the most recent version of unix-compat that
> doesn't specify version bounds on the unix package, which is what
> you're having trouble with.
>
> If it works let us know.
>
> Antoine
>
>> Thanks for the help!
>> Tom
>

Also, I'm pretty confused by all of this - unix-2.4.0.0 should build
on GCH 6.10. Folks have been saying they've had bad luck installing it
separate from a GHC install, though, so I don't know if I should
recommend it.

Antoine



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

Message: 4
Date: Wed, 6 Apr 2011 00:40:19 -0400
From: Tom Murphy <amin...@gmail.com>
Subject: Re: [Haskell-beginners] Happstack dependency problems
To: Antoine Latter <aslat...@gmail.com>
Cc: beginners@haskell.org, Daniel Fischer
        <daniel.is.fisc...@googlemail.com>
Message-ID: <banlktime3r5fpwf0nbhdrx+uxv4wby4...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

>
> It requires unix-compat to build. What does "cabal install
> unix-compat" give you?
>

The same error. But...


>
> If that's what's breaking you can try "cabal install
> unix-compat-0.1.2.1" and then "cabal install happstack-util". Version
> 0.1.2.1 appears to be the most recent version of unix-compat that
> doesn't specify version bounds on the unix package, which is what
> you're having trouble with.
>
>
This worked, then "cabal install happstack" worked perfectly(!)
     Can anyone point me to a tutorial which explains basics of cabal? I'm
trying to navigate it, without understanding version bounds, or really
anything related to how cabal handles versions of dependencies.

Thank you for the help!
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110406/3cbe802d/attachment-0001.htm>

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

Message: 5
Date: Wed, 6 Apr 2011 09:51:58 +0300
From: Mats Rauhala <mats.rauh...@gmail.com>
Subject: Re: [Haskell-beginners] happstack versus yesod
To: beginners@haskell.org
Message-ID: <20110406065158.GA9967@libre.local>
Content-Type: text/plain; charset="us-ascii"

My uninformed take on this is that Yesod is a bit like Django,
~everything comes as default, and the packages have been chosen for you.
Yesod/django holds your hand and tells you the right way to do x.

Happstack on the other hand is like Pylons where you have the freedom to
choose your db libraries/whatever you need. Pylons is also maybe bit
more vanilla python without so much "sugaring" (I don't think the term
applies well to python, but for yesod/happstack argument it does)

I'm not saying that Yesod prevents you from choosing your own DB
abstraction layer, I'm saying it comes with one. I think both approaches
are good, and it depends on your requirements, which you should choose.

On a side-note, both of their documentation is "great". They both seem a
bit raw, especially yesod, but the content within already is excellent
and provide great ideas. I've used Yesod's documentation to deepen my
understanding on web technologies, type safety and enumerators.
Happstack has taught me more concrete areas such as MonadPlus and
Alternative (msum for routing <3).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110406/6faf796f/attachment-0001.pgp>

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

Message: 6
Date: Wed, 06 Apr 2011 11:24:45 +0200
From: Christian Maeder <christian.mae...@dfki.de>
Subject: Re: [Haskell-beginners] Tuples .vs Either Vs datatypes
To: Mike Meyer <m...@mired.org>
Cc: beginners@haskell.org
Message-ID: <4d9c315d.10...@dfki.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Am 05.04.2011 19:41, schrieb Mike Meyer:
[...]
> data CharClass = Fail | Pattern String
> matchCharClass :: Pattern ->  Char ->  CharClass

As mentioned by Alex Rozenshteyn this CharClass is isomorphic to "Maybe 
String".

> This only required minor changes to the code, but made it easy to add
> "Error String" to the CharClass datatype later. That version can be

Replacing Fail (or Nothing) by "Error String" is like going to "Either 
String String".

Yet, user-defined data types (no type synonyms!) may increase 
readability (and type safety). However, one disadvantage is that some 
type class instances have to be redefined (or derived) if needed.

"Maybe" and "Either String" are fairly standard (and have Monad and what 
not instances), still your data type CharClass is perfect (if it serves 
the purpose).

HTH Christian

> seen at http://pastebin.com/eyre8795 (as always, critiques welcome).
>
> I'd like to hear what more experienced haskell programmers have to say
> about those three ways of returning multiple values.
>
>        Thanks,
>        <mike



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

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 34, Issue 15
*****************************************

Reply via email to