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:  cabal problems (Patrick Wheeler)
   2. Re:  cabal problems (Kees Bleijenberg)
   3.  Pattern Matching & Binding (Ari King)
   4. Re:  Pattern Matching & Binding (David McBride)
   5. Re:  cabal problems (Patrick Wheeler)


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

Message: 1
Date: Mon, 5 May 2014 07:20:56 -0500
From: Patrick Wheeler <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] cabal problems
Message-ID:
        <caao_byystcwsv8onubjdfidguahf8zt2my5fqthv+ar7jks...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

You could try to download cabal binary from:
http://www.haskell.org/cabal/download.html

This might be a this issue, the error reported looks similar:
https://github.com/haskell/cabal/issues/1561

If it is the same then using a newer version of cabal should fix the
problem.

Patrick


On Mon, May 5, 2014 at 4:32 AM, Kees Bleijenberg <[email protected]
> wrote:

> Thanks Patrick. I think cabal on Windows is different. There is no
> index.tar.gz on my computer. Maybe I'll wait for a new release of the
> Haskell Platform to install GHC again :-(
>
> Additonal: a few days ago I tried to install eclipseFP and the
> installation failed with a cabal error (don't know what error).  Maybe that
> is the source of my problems?.?
>
> Kees
> =========================
>
> Van: Beginners [mailto:[email protected]] Namens Patrick
> Wheeler
> Verzonden: zondag 4 mei 2014 23:35
> Aan: The Haskell-Beginners Mailing List - Discussion of primarily
> beginner-level topics related to Haskell
> Onderwerp: Re: [Haskell-beginners] cabal problems
>
> I have not run into that problem before.
>
> I would download:
> http://hackage.haskell.org/packages/index.tar.gz
>
> There is a link for it near the bottom of the main page:
> http://hackage.haskell.org
>
> On my mac i would copy it to:
>
> ~/.cabal/packages/hackage.haskell.org/.
>
> I am not sure where the cabal directory is on windows though.
>
> If that does not work another option wold but to download the source for
> cabal-install and compile it.
>
> cabal unpack cabal-install, or grab the tarball at the bottom of:
> http://hackage.haskell.org/package/cabal-install
>
> cd into the directory and use `cabal install`
>
> That should work if you have all of the dependancies already on your
> computer. If you don't and the missing dependency list is large(cabal
> configure can tell you what you are missing) then it might just be quicker
> to reinstall the haskell platform.
>
> Hope that helps,
>
> Patrick
>
> On Sat, May 3, 2014 at 1:09 PM, Kees Bleijenberg <
> [email protected]> wrote:
> I don?t know exactly how, but suddenly I get cabal errors.
> If I do cabal update there are no errors, everything is fine.
> Cabal install caball-install => cabal: internal error when reading
> packages  index: could not read tar file entry. The package index or
> package cache is probably corrupt. Running cabal update might fix it.
> Every  install or update shows the same error message.
>
> I?am using win7 64 bits, Haskell platform 2013.2.0.0. If i do  cabal  - -
> version => cabal install version 1.18.0.2 using version 1.18.1 of the cabal
> library.
> On Google the advice is to clear the directory
> c:\users\<user>\appData\roaming\cabal empty.  But that removes all my
> packages. Isn?t there an easier way?
> I have never used cabal sandboxes (at least not on purpose)
>
> Kees
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
>
>
> --
> Patrick Wheeler
> [email protected]
> [email protected]
> [email protected]
> ________________________________________
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2014.0.4570 / Virus Database: 3931/7439 - Release Date: 05/04/14
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>



-- 
Patrick Wheeler
[email protected]
[email protected]
[email protected]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140505/3458178b/attachment-0001.html>

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

Message: 2
Date: Mon, 5 May 2014 14:48:52 +0200
From: "Kees Bleijenberg" <[email protected]>
To: "'The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell'" <[email protected]>
Subject: Re: [Haskell-beginners] cabal problems
Message-ID: <000601cf6860$5e6f3810$1b4da830$@[email protected]>
Content-Type: text/plain;       charset="UTF-8"

Thanks Patrick. 
First I tried cabal install cabal cabal-install => errors.
But downloading and installing the cabal.exe worked. Everything seems okay now. 
Thanks.

Kees

===========

Van: Beginners [mailto:[email protected]] Namens Patrick Wheeler
Verzonden: maandag 5 mei 2014 14:21
Aan: The Haskell-Beginners Mailing List - Discussion of primarily 
beginner-level topics related to Haskell
Onderwerp: Re: [Haskell-beginners] cabal problems

You could try to download cabal binary from:
http://www.haskell.org/cabal/download.html

This might be a this issue, the error reported looks similar:
https://github.com/haskell/cabal/issues/1561

If it is the same then using a newer version of cabal should fix the problem.

Patrick
 --- snip ---



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

Message: 3
Date: Mon, 5 May 2014 12:08:56 -0400
From: Ari King <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] Pattern Matching & Binding
Message-ID:
        <CAPcS2ah8G2rKKOBwiy5k8YZJh4oyC9o1mER1=krlth926+e...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,

I've posted (on http://pastebin.com/R5MPNaHs) code I'm working on to
practice reading/writing CSV and interacting with DBs. I'd appreciate help
in better understanding how to destructure (pattern match) lists/vectors
(see line 28 in post) and the difference in "binding" via let/where and <-.
I'd also appreciate suggestions on how to improve the code put together
thus far to make it more idiomatic. Thanks.

Best,
Ari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140505/db61f3a4/attachment-0001.html>

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

Message: 4
Date: Mon, 5 May 2014 12:21:34 -0400
From: David McBride <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Pattern Matching & Binding
Message-ID:
        <CAN+Tr43DBJhuEx3uS+a0r3DqRyN97AKnf2n=_auzvpk5ue2...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I don't have pg installed so I can't run your code but I assume you are
breaking on the vector pattern matching.  Pattern matching using : only
works because the : operator is a constructor in lists.

>:i (:)
data [] a = ... | a : [a]

Remember that : is an infix operator, but it is comparable to Just, Left,
or Right.  You are trying to use a list constructor to pattern match on a
vector which looks nothing like a list.

However you can do this sort of pattern matching by using vector's (or
almost any other collection's) toList function:

hostaddr:port:dbname:username:password:rest = toList vec

<- is a monadic binding. You use it when you are dealing with a datatype
that happens to be an instance of Monad.  It happens to be the only way to
get anything out of an IO type, which is what you are using it for here.
If something is just using plain types, Int, String, etc, just use lets.


On Mon, May 5, 2014 at 12:08 PM, Ari King <[email protected]>wrote:

> Hi,
>
> I've posted (on http://pastebin.com/R5MPNaHs) code I'm working on to
> practice reading/writing CSV and interacting with DBs. I'd appreciate help
> in better understanding how to destructure (pattern match) lists/vectors
> (see line 28 in post) and the difference in "binding" via let/where and <-.
> I'd also appreciate suggestions on how to improve the code put together
> thus far to make it more idiomatic. Thanks.
>
> Best,
> Ari
>
>
>
> _______________________________________________
> 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/20140505/c07efb9c/attachment-0001.html>

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

Message: 5
Date: Mon, 5 May 2014 18:09:39 -0500
From: Patrick Wheeler <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] cabal problems
Message-ID:
        <caao_byztgub0e+4w69eymtazpqprydjun-0yi2_tcoghgt7...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

> But downloading and installing the cabal.exe worked. Everything seems
okay now. Thanks.

Great glad it worked.


On Mon, May 5, 2014 at 7:48 AM, Kees Bleijenberg <[email protected]
> wrote:

> Thanks Patrick.
> First I tried cabal install cabal cabal-install => errors.
> But downloading and installing the cabal.exe worked. Everything seems okay
> now. Thanks.
>
> Kees
>
> ===========
>
> Van: Beginners [mailto:[email protected]] Namens Patrick
> Wheeler
> Verzonden: maandag 5 mei 2014 14:21
> Aan: The Haskell-Beginners Mailing List - Discussion of primarily
> beginner-level topics related to Haskell
> Onderwerp: Re: [Haskell-beginners] cabal problems
>
> You could try to download cabal binary from:
> http://www.haskell.org/cabal/download.html
>
> This might be a this issue, the error reported looks similar:
> https://github.com/haskell/cabal/issues/1561
>
> If it is the same then using a newer version of cabal should fix the
> problem.
>
> Patrick
>  --- snip ---
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>



-- 
Patrick Wheeler
[email protected]
[email protected]
[email protected]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140505/a3ea60da/attachment.html>

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

Subject: Digest Footer

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


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

End of Beginners Digest, Vol 71, Issue 8
****************************************

Reply via email to