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: Antiderivative (indefinite integral)? (Twan van Laarhoven)
2. cabal install error: (Illegal instance declaration for
`StrictByteString String') (miro)
3. can't install hackage package (Emmanuel Touzery)
4. Re: can't install hackage package (Emmanuel Touzery)
5. Re: can't install hackage package (Hartmut)
6. Fwd: Re: can't install hackage package (Emmanuel Touzery)
----------------------------------------------------------------------
Message: 1
Date: Mon, 21 Jan 2013 16:30:26 +0100
From: Twan van Laarhoven <[email protected]>
Subject: Re: [Haskell-beginners] Antiderivative (indefinite integral)?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed
If you don't care about efficiency, you can define
antideriv :: (Int -> Int) -> Int -> Int
antideriv f x
| x >= 0 = sum [ f y | y <- [0..x-1] ]
| x < 0 = - sum [ f y | y <- [x..-1] ]
which has the property that
antideriv f x1 - antideriv f x0 == sum [f x | x <- [x0..x1-1]]
Twan
On 19/01/13 19:55, Martin Drautzburg wrote:
> Hello all,
>
> not strictly a Haskell question, but anyways ...
>
> is it possible to compute the antiderivative of a function f::Int->Int ?
>
> I understand that you can compute the definite integral by simply summing up
> the values of f within a given interval.
>
> My first guess would be: no this is not possible. The antiderivative F of a
> function f::Int->Int needs to have the property that F(b) - F(a) must be the
> sum of f within [a,b]. To do this I must know all values withib [a,b]. But at
> the time I compute the antiderivative I do not know this interval yet.
>
> What is striking me is that in calculus I can often symbolically compute the
> antiderivative and I get a simple function, and I can get the value of F for a
> given x and I get a simple number. Why is that so?
>
------------------------------
Message: 2
Date: Mon, 21 Jan 2013 20:43:17 +0100
From: miro <[email protected]>
Subject: [Haskell-beginners] cabal install error: (Illegal instance
declaration for `StrictByteString String')
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Hi, please,....I'm trying to install one package
(neo4j-haskell-http-client) and below is the error I'm getting. Pls. any
ideas how can I fix that?
---------------
1 of 1] Compiling Data.ByteString.Class ( Data/ByteString/Class.hs,
dist/build/Data/ByteString/Class.o )
Data/ByteString/Class.hs:39:10:
Illegal instance declaration for `StrictByteString String'
(All instance types must be of the form (T a1 ... an)
where a1 ... an are *distinct type variables*,
and each type variable appears at most once in the instance head.
Use -XFlexibleInstances if you want to disable this.)
In the instance declaration for `StrictByteString String'
Data/ByteString/Class.hs:55:10:
Illegal instance declaration for `LazyByteString String'
(All instance types must be of the form (T a1 ... an)
where a1 ... an are *distinct type variables*,
and each type variable appears at most once in the instance head.
Use -XFlexibleInstances if you want to disable this.)
In the instance declaration for `LazyByteString String'
Updating documentation index /Users/miro/Library/Haskell/doc/index.html
cabal: Error: some packages failed to install:
bytestring-class-0.0.0 failed during the building phase. The exception was:
ExitFailure 1
neo4j-haskell-0.4.1 depends on bytestring-class-0.0.0 which failed to
install.
---------------
cheers,
m.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130121/a2ec26ae/attachment-0001.htm>
------------------------------
Message: 3
Date: Mon, 21 Jan 2013 20:53:29 +0100
From: Emmanuel Touzery <[email protected]>
Subject: [Haskell-beginners] can't install hackage package
To: "[email protected]" <[email protected]>
Message-ID:
<cac42remcxhbnmpesyfqqh4sfo03qtak49bab90k7exk8msm...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hello,
I've been using this hackage package "rex" without problems on two
computers (linux, windows) but now I fail setting it up on a third computer
which confuses me, and the error message is not really enlightening for me:
$ cabal update
Downloading the latest package list from hackage.haskell.org
$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0.3 of the Cabal library
$ cabal install rex
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: rex-0.3.1
Any idea?
Thank you!
Emmanuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130121/73d457d6/attachment-0001.htm>
------------------------------
Message: 4
Date: Mon, 21 Jan 2013 21:10:10 +0100
From: Emmanuel Touzery <[email protected]>
Subject: Re: [Haskell-beginners] can't install hackage package
To: "[email protected]" <[email protected]>
Message-ID:
<cac42renhveeyo1g7ppx5a66tgn7rqteoycdf0swxjvdycjv...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
This is on fedora18 if it can help.
On 21 Jan 2013 20:53, "Emmanuel Touzery" <[email protected]> wrote:
> Hello,
>
> I've been using this hackage package "rex" without problems on two
> computers (linux, windows) but now I fail setting it up on a third computer
> which confuses me, and the error message is not really enlightening for me:
>
> $ cabal update
> Downloading the latest package list from hackage.haskell.org
> $ cabal --version
> cabal-install version 1.16.0.2
> using version 1.16.0.3 of the Cabal library
> $ cabal install rex
> Resolving dependencies...
> cabal: Could not resolve dependencies:
> trying: rex-0.3.1
>
> Any idea?
>
> Thank you!
>
> Emmanuel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130121/119c615c/attachment-0001.htm>
------------------------------
Message: 5
Date: Mon, 21 Jan 2013 21:36:12 +0100
From: Hartmut <[email protected]>
Subject: Re: [Haskell-beginners] can't install hackage package
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Hi,
I wanted to try this under Windows also, but there are even more
problems, since "pcre-light" dependency is not available (perhaps in
case of using MSys, MingW)
Hartmut
Windows, cabal 1.16.0.2, I got
cabal install rex --dry-run
Resolving dependencies...
In order, the following would be installed (use -v for more details):
hslogger-1.2.1
MissingH-1.2.0.0
pcre-light-0.4
split-0.2.1.1
th-lift-0.5.5
th-orphans-0.6
haskell-src-meta-0.6.0.1
rex-0.3.1
cabal install
Resolving dependencies...
Configuring pcre-light-0.4...
cabal: Missing dependency on a foreign library:
* *Missing C library: pcre*
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the
library is
already installed but in a non-standard location then you can use
the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
pcre-light-0.4 failed during the configure step. The exception was:
ExitFailure 1
rex-0.3.1 depends on pcre-light-0.4 which failed to install.
Am 21.01.2013 21:10, schrieb Emmanuel Touzery:
>
> This is on fedora18 if it can help.
>
> On 21 Jan 2013 20:53, "Emmanuel Touzery" <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hello,
>
> I've been using this hackage package "rex" without problems on
> two computers (linux, windows) but now I fail setting it up on a
> third computer which confuses me, and the error message is not
> really enlightening for me:
>
> $ cabal update
> Downloading the latest package list from hackage.haskell.org
> <http://hackage.haskell.org>
> $ cabal --version
> cabal-install version 1.16.0.2
> using version 1.16.0.3 of the Cabal library
> $ cabal install rex
> Resolving dependencies...
> cabal: Could not resolve dependencies:
> trying: rex-0.3.1
>
> Any idea?
>
> Thank you!
>
> Emmanuel
>
>
>
> _______________________________________________
> 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/20130121/9af3983a/attachment-0001.htm>
------------------------------
Message: 6
Date: Mon, 21 Jan 2013 21:40:55 +0100
From: Emmanuel Touzery <[email protected]>
Subject: [Haskell-beginners] Fwd: Re: can't install hackage package
To: "[email protected]" <[email protected]>
Message-ID:
<cac42rekxoosnqosx-kkqaf3+yzg+y7cnt0g2ictr-wwmyp5...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I made it work on another windows computer by copying a pcre.dll i found on
internet and setting some environment variables. It's not difficult but
right now i forgot the details..
---------- Forwarded message ----------
From: "Hartmut" <[email protected]>
Date: 21 Jan 2013 21:37
Subject: Re: [Haskell-beginners] can't install hackage package
To: <[email protected]>
Hi,
I wanted to try this under Windows also, but there are even more problems,
since "pcre-light" dependency is not available (perhaps in case of using
MSys, MingW)
Hartmut
Windows, cabal 1.16.0.2, I got
cabal install rex --dry-run
Resolving dependencies...
In order, the following would be installed (use -v for more details):
hslogger-1.2.1
MissingH-1.2.0.0
pcre-light-0.4
split-0.2.1.1
th-lift-0.5.5
th-orphans-0.6
haskell-src-meta-0.6.0.1
rex-0.3.1
cabal install
Resolving dependencies...
Configuring pcre-light-0.4...
cabal: Missing dependency on a foreign library:
* *Missing C library: pcre*
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
pcre-light-0.4 failed during the configure step. The exception was:
ExitFailure 1
rex-0.3.1 depends on pcre-light-0.4 which failed to install.
Am 21.01.2013 21:10, schrieb Emmanuel Touzery:
This is on fedora18 if it can help.
On 21 Jan 2013 20:53, "Emmanuel Touzery" <[email protected]> wrote:
> Hello,
>
> I've been using this hackage package "rex" without problems on two
> computers (linux, windows) but now I fail setting it up on a third computer
> which confuses me, and the error message is not really enlightening for me:
>
> $ cabal update
> Downloading the latest package list from hackage.haskell.org
> $ cabal --version
> cabal-install version 1.16.0.2
> using version 1.16.0.3 of the Cabal library
> $ cabal install rex
> Resolving dependencies...
> cabal: Could not resolve dependencies:
> trying: rex-0.3.1
>
> Any idea?
>
> Thank you!
>
> Emmanuel
>
_______________________________________________
Beginners mailing
[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/20130121/18ad4d55/attachment.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 55, Issue 22
*****************************************