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.  Cabal question: Include CHANGES and TODO files?
      (Patrick LeBoutillier)
   2. Re:  happstack versus yesod (Patrick Lynch)
   3. Re:  Cabal question: Include CHANGES and TODO     files?
      (Christopher Done)
   4. Re:  Happstack dependency problems (Patrick Lynch)
   5. Re:  Looking for some pro bono haskell work (Patrick Lynch)
   6. Re:  Tuples .vs Either Vs datatypes (Mike Meyer)
   7. Re:  Tuples .vs Either Vs datatypes (Christian Maeder)


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

Message: 1
Date: Wed, 6 Apr 2011 09:17:14 -0400
From: Patrick LeBoutillier <[email protected]>
Subject: [Haskell-beginners] Cabal question: Include CHANGES and TODO
        files?
To: beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hi ,

Is there anyway to tell cabal to include extra files in the tarball,
i.e. TODO and CHANGES?
I like to maintain these files along with my projects and I'd like
them to be in the tar dist.

Patrick

-- 
=====================
Patrick LeBoutillier
Rosem?re, Qu?bec, Canada



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

Message: 2
Date: Wed, 06 Apr 2011 09:18:04 -0400
From: "Patrick Lynch" <[email protected]>
Subject: Re: [Haskell-beginners] happstack versus yesod
To: "Mats Rauhala" <[email protected]>,    <[email protected]>
Message-ID: <D6E7136668F949B380EDA4AB4179C5E7@UserPC>
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
        reply-type=original

Good morning,
Thank you for your very informative comments...
I'm starting Yesod and will , now, also take a look at happstack...
I'm an independent software consultant, so I'm looking for a way to make 
money using Haskell...
I tried installing the TK interface to Haskell but was unable to get it 
loaded...I spent about a week on it before finally abandoning this effort...
So, I was about ready to give up on Haskell, since I couldn't figure how to 
connect it to TK or to the web, and then along came Yesod and Happstack, 
hopefully, to the rescue...
I'll let you know how I make out
Wish me luck

----- Original Message ----- 
From: "Mats Rauhala" <[email protected]>
To: <[email protected]>
Sent: Wednesday, April 06, 2011 2:51 AM
Subject: Re: [Haskell-beginners] happstack versus yesod


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




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

Message: 3
Date: Wed, 6 Apr 2011 15:21:21 +0200
From: Christopher Done <[email protected]>
Subject: Re: [Haskell-beginners] Cabal question: Include CHANGES and
        TODO    files?
To: Patrick LeBoutillier <[email protected]>
Cc: beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

On 6 April 2011 15:17, Patrick LeBoutillier
<[email protected]>wrote:

> Is there anyway to tell cabal to include extra files in the tarball,
> i.e. TODO and CHANGES?
>

Use the Extra-source-files property.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110406/57d2a154/attachment-0001.htm>

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

Message: 4
Date: Wed, 06 Apr 2011 09:22:02 -0400
From: "Patrick Lynch" <[email protected]>
Subject: Re: [Haskell-beginners] Happstack dependency problems
To: "Tom Murphy" <[email protected]>,   "Antoine Latter"
        <[email protected]>
Cc: [email protected], Daniel Fischer
        <[email protected]>
Message-ID: <4B973910748349DEA55C06251B2F7901@UserPC>
Content-Type: text/plain; charset="iso-8859-1"

Good morning,
The Cabal User manual link is: 
http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/
I'm right behind you, I'm working on Yesod on a Windows Vista PC.
Wish us both luck
  ----- Original Message ----- 
  From: Tom Murphy 
  To: Antoine Latter 
  Cc: [email protected] ; Daniel Fischer 
  Sent: Wednesday, April 06, 2011 12:40 AM
  Subject: Re: [Haskell-beginners] Happstack dependency problems


    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


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


  _______________________________________________
  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/20110406/2ae6a505/attachment-0001.htm>

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

Message: 5
Date: Wed, 06 Apr 2011 09:33:12 -0400
From: "Patrick Lynch" <[email protected]>
Subject: Re: [Haskell-beginners] Looking for some pro bono haskell
        work
To: "aditya siram" <[email protected]>
Cc: [email protected]
Message-ID: <C7D62FA7A626459FA40E1CAA5AC9F644@UserPC>
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
        reply-type=original

Good morning,
Thanks for the advice...I'll take it and proceed to Yesod...
...but take a look at the following link: 
http://www.scss.tcd.ie/Edsko.de.Vries/talks/cattheory.pdf
...it does such a nice job in explaining CT and how it interfaces with 
Haskell...
...if someone wants to start a project using Edsko's method, I'd be sure to 
volunteer...
Good day

----- Original Message ----- 
From: "aditya siram" <[email protected]>
To: "Patrick Lynch" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, April 05, 2011 12:34 PM
Subject: Re: [Haskell-beginners] Looking for some pro bono haskell work


I'm no Haskell guru, but I don't know any category theory and it
hasn't been a major stumbling block for me. I think you get a long
ways with Haskell before you need to go there.
-deech

On Tue, Apr 5, 2011 at 9:04 AM, Patrick Lynch <[email protected]> 
wrote:
> ...one more project...
>
> I tried to understand Category Theory but was unable to do so...
> I tried reading three books in regard to it and can understand the
> definition of Category...but couldn't follow any of these books past the
> first chapter and was unable to do any of the exercises in them...
> However, I did see a few links that 'graphically' showed a Category and
> another that showed some categories and how they were implemented in 
> Haskell
> - these made the most sense to me...
> Since categories are the basis for Functors, Monoids and Monads - which 
> are
> extensively used in Haskell and implicitly used, I think, in Linq - I 
> would
> be very willing to participate in a project that showed categories and how
> they are implemented in Haskell...
>
> Just a thought...
>
> Ps
> I am an independent software consultant [been doing it for 30+ years].
> I did a market evaluation of Haskell and Linq and found the following:
> - there are page after page of Ling/C# jobs...
> - I only saw 1 Haskell job...
> It 'begs the question': is some commercial organization going to implement
> Haskell as a product [I don't think it will be Microsoft, since they have
> introduced F#]...
>
> ----- Original Message ----- From: "Patrick Lynch"
> <[email protected]>
> To: "aditya siram" <[email protected]>
> Cc: <[email protected]>
> Sent: Tuesday, April 05, 2011 9:45 AM
> Subject: Re: [Haskell-beginners] Looking for some pro bono haskell work
>
>
>> Good morning,
>> Thanks for the advice.
>> I sent an email to Zvon and volunteered to help them with the examples of
>> Haskell functions in their "Haskell Reference Page"
>> The projects that I envisage are:
>> - I tried to get TK installed but was unable to do so, if someone is
>> working this install, I would be willing to test it for them...
>> - If anyone is working on a web front-end to Haskell, I would be
>> willing to participate...
>> Good day
>>
>> ----- Original Message ----- From: "aditya siram" 
>> <[email protected]>
>> To: "Patrick Lynch" <[email protected]>
>> Cc: <[email protected]>
>> Sent: Monday, April 04, 2011 5:19 PM
>> Subject: Re: [Haskell-beginners] Looking for some pro bono haskell work
>>
>>
>>> I would pick a project and contribute a patch to it, or start one of 
>>> your
>>> own.
>>> -deech
>>>
>>> On Mon, Apr 4, 2011 at 4:17 PM, Patrick Lynch <[email protected]>
>>> wrote:
>>>>
>>>> Good afternoon,
>>>> I've read all the books and am looking for some pro bono Haskell
>>>> Development
>>>> work...
>>>> If you have some, please email me...
>>>> Thanks
>>>> _______________________________________________
>>>> 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: 6
Date: Wed, 6 Apr 2011 18:33:16 -0400
From: Mike Meyer <[email protected]>
Subject: Re: [Haskell-beginners] Tuples .vs Either Vs datatypes
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

On Wed, 06 Apr 2011 11:24:45 +0200
Christian Maeder <[email protected]> wrote:

> 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".

I think I missed the mail from Alex. But yes, that makes sense. And
learning how to use the built-in types is part of learning the
language.

> > 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".

Ok this confuses me. What does "or Nothing" by "Error String" mean?

data CharClass = Fail | Pattern String | Error String

is the same as "Maybe (Either Pattern Error)"? (Fail being a poorly
chosen name - NoMatch would be better).

> 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.

Right. I prefer adding the Pattern & Error types, so they document
which of Left and Right should be used here.

> "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

Yup.  Very educational. Thanks.

> > seen at http://pastebin.com/eyre8795 (as always, critiques welcome).

This has been updated to use the 'Maybe (Either Pattern Error)" return
values.

        Thank you.
        <mike
-- 
Mike Meyer <[email protected]>             http://www.mired.org/consulting.html
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



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

Message: 7
Date: Thu, 07 Apr 2011 10:55:48 +0200
From: Christian Maeder <[email protected]>
Subject: Re: [Haskell-beginners] Tuples .vs Either Vs datatypes
To: Mike Meyer <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Am 07.04.2011 00:33, schrieb Mike Meyer:
>> Replacing Fail (or Nothing) by "Error String" is like going to "Either
>> String String".
>
> Ok this confuses me. What does "or Nothing" by "Error String" mean?
>
> data CharClass = Fail | Pattern String | Error String

I assumed that you replaced "Fail" (which corresponds to "Nothing" for 
the Maybe data type) with "Error String" (without looking at your code), 
so that you can attach a message to a failure.

   data CharClass = Error String | Pattern String

which is isomorphic to ""Either String String", where "Left" capture 
failure strings and "Right" captures valid patterns.

> is the same as "Maybe (Either Pattern Error)"? (Fail being a poorly
> chosen name - NoMatch would be better).

I don't think, that you need "Maybe (Either Pattern Error)", just code 
the "Nothing" case as a suitable "error string".

Also "Either Pattern Error" has the wrong order. The "Error" should be 
the "Left" component (by convention) for Monad instances to work as 
expected! (This also applies to your "Either Bool Error" usage.)

The type synonyms Pattern and Error (being String) gain no additional 
type safety. They only reveal (to the reader) that Either was used in 
the wrong way, but would not stop you from using the Monad instances in 
a wrong way.

>> 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.
>
> Right. I prefer adding the Pattern&  Error types, so they document
> which of Left and Right should be used here.

As I said, "Left" is by convention the error case.

>> "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
>
> Yup.  Very educational. Thanks.
>
>>> seen at http://pastebin.com/eyre8795 (as always, critiques welcome).
>
> This has been updated to use the 'Maybe (Either Pattern Error)" return
> values.

The CharClass as above would be safer. (Nesting of Either in Maybe is 
overkill.)

Cheers Christian



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

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


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

Reply via email to