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:  problem installing checkers (Britt Anderson)
   2.  How do I determine if a list created using a lambda
      expression is null? (Costello, Roger L.)
   3. Re:  How do I determine if a list created using   a lambda
      expression is null? (Thomas Davie)
   4. Re:  cabal install happstack (Gary Klindt)
   5. Re:  List of all prelude function types? (Bryce Verdier)


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

Message: 1
Date: Mon, 24 Oct 2011 09:07:48 -0400
From: Britt Anderson <[email protected]>
Subject: Re: [Haskell-beginners] problem installing checkers
To: [email protected]
Message-ID:
        <CAL4wg0h_m3SxEaEiCXX1GK=klykbrnapk9l1+pntafi7epw...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

> Message: 10
> Date: Sun, 23 Oct 2011 21:42:20 -0400
> From: Brent Yorgey <[email protected]>
> Subject: Re: [Haskell-beginners] problem installing checkers
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=us-ascii
>
> On Sun, Oct 23, 2011 at 06:56:57PM -0400, Britt Anderson wrote:
>> I wanted to try reactive, but cabal install fails on checkers (a
>> dependency). Here is a portion of the error message, there are other
>> overlapping instances that follow. Can someone advise me how to
>> proceed. Thank you.
>>
>> [13 of 15] Compiling Test.QuickCheck.Classes (
>> src/Test/QuickCheck/Classes.hs, dist/build/Test/QuickCheck/Classes.o )
>>
>> src/Test/QuickCheck/Classes.hs:137:38:
>> ? ? Overlapping instances for Show (a -> b)
>> ? ? ? arising from a use of `property'
>> ? ? Matching instances:
>> ? ? ? instance Show (a -> b) -- Defined in Text.Show.Functions
>> ? ? ? instance Show base:System.Event.Manager.IOCallback
>> ? ? ? ? -- Defined in base:System.Event.Manager
>
> This is very naughty of System.Event.Manager, to define IOCallback as
> a *type synonym* for a certain function type, and then declare a Show
> instance for it. ?However, the instance shouldn't come into play
> unless System.Event.Manager is imported, and I don't think it is. So
> this error message seems rather odd to me. ?What version of GHC do you
> have? ?What is the output of 'ghc-pkg list' and 'ghc-pkg check'?
>
> -Brent
>


Here is the print out of the last part of the error message when doing
sudo cabal install reactive --global followed by the ghc-pkg list and
ghc-pkg check functions.
Thank you,

...

src/Test/QuickCheck/Classes.hs:514:37:
    Overlapping instances for Show (a -> m)
      arising from a use of `property'
    Matching instances:
      instance Show (a -> b) -- Defined in Text.Show.Functions
      instance Show base:System.Event.Manager.IOCallback
        -- Defined in base:System.Event.Manager
    (The choice depends on the instantiation of `a, m'
     To pick the first instance above, use -XIncoherentInstances
     when compiling the other instance declarations)
    In the expression: property foldMapP
    In the expression: ("foldMap", property foldMapP)
    In the expression:
      [("fmap", property fmapP), ("foldMap", property foldMapP)]
cabal: Error: some packages failed to install:
category-extras-0.53.5 failed during the building phase. The exception was:
ExitFailure 1
checkers-0.2.8 failed during the building phase. The exception was:
ExitFailure 1
reactive-0.11.5 depends on checkers-0.2.8 which failed to install.
[britt@britt-fr07 ~]$ ghc-pkg list
/usr/lib/ghc-7.0.3/package.conf.d
   Boolean-0.0.1
   Cabal-1.10.1.0
   GLFW-0.4.2
   GLURaw-1.1.0.0
   HTTP-4000.1.1
   HUnit-1.2.2.3
   MemoTrie-0.4.10
   MissingH-1.1.0.3
   ObjectName-1.0.0.0
   OpenGL-2.4.0.1
   OpenGLRaw-1.1.0.1
   QuickCheck-2.4.1.1
   StateVar-1.0.0.0
   Stream-0.4.2
   Tensor-1.0.0.1
   TypeCompose-0.8.3
   X11-1.5.0.0
   array-0.3.0.2
   base-4.3.1.0
   base64-bytestring-0.1.0.3
   bin-package-db-0.0.0.0
   binary-0.5.0.2
   bytestring-0.9.1.10
   citeproc-hs-0.3.2
   containers-0.4.0.0
   deepseq-1.1.0.2
   digest-0.0.0.9
   directory-1.1.0.0
   dlist-0.5
   extensible-exceptions-0.1.1.2
   ffi-1.0
   filepath-1.2.0.0
   ghc-7.0.3
   ghc-binary-0.5.0.2
   ghc-prim-0.2.0.0
   haskell2010-1.0.0.0
   haskell98-1.1.0.1
   hpc-0.5.0.6
   hs-bibutils-4.12
   hslogger-1.1.5
   integer-gmp-0.2.0.3
   json-0.4.4
   lazysmallcheck-0.5
   mtl-2.0.1.0
   network-2.3.0.5
   old-locale-1.0.0.2
   old-time-1.0.0.6
   pandoc-1.8.2.1
   pandoc-types-1.8.2
   parsec-3.1.1
   pretty-1.0.1.2
   process-1.0.1.5
   random-1.0.0.3
   regex-base-0.93.2
   regex-compat-0.95.1
   regex-posix-0.95.1
   rts-1.0
   syb-0.3
   tagsoup-0.12.2
   template-haskell-2.5.0.0
   texmath-0.5.0.1
   text-0.11.1.5
   time-1.2.0.3
   transformers-0.2.2.0
   unamb-0.2.4
   unix-2.4.2.0
   utf8-string-0.3.6
   vector-space-0.7.3
   xhtml-3000.2.0.1
   xml-1.3.9
   zip-archive-0.1.1.7
   zlib-0.5.3.1
[britt@britt-fr07 ~]$ ghc-pkg check
[britt@britt-fr07 ~]$



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

Message: 2
Date: Mon, 24 Oct 2011 20:21:46 +0000
From: "Costello, Roger L." <[email protected]>
Subject: [Haskell-beginners] How do I determine if a list created
        using a lambda expression is null?
To: "[email protected]" <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Hi Folks,

I have a lambda expression that can be used to construct a list of values:

cons = (\a -> (\b -> (\f -> f a b)))

Here is an example that uses cons to construct "hello"

hello = cons 'h' (cons 'e' (cons 'l' (cons 'l' 'o')))

And here is a lambda expression that returns the tail of a list created using 
cons:

tail' = (\c -> c (\a -> (\b -> b)))

I would like to create a function that computes the length of a cons-created 
list:

length' = \xs -> if ( null' xs ) then 0 else length' (tail' xs) + 1

How would I define null' to determine if a cons list is empty?

null' = ???


/Roger



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

Message: 3
Date: Mon, 24 Oct 2011 21:40:04 +0100
From: Thomas Davie <[email protected]>
Subject: Re: [Haskell-beginners] How do I determine if a list created
        using   a lambda expression is null?
To: "Costello, Roger L." <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

You need to define your empty list first, I'd suggest something along the lines 
of:

nil = \f -> True

Does that help with your definition for null?

Bob
if (*ra4 != 0xffc78948) { return false; }

On 24 Oct 2011, at 21:21, Costello, Roger L. wrote:

> Hi Folks,
> 
> I have a lambda expression that can be used to construct a list of values:
> 
> cons = (\a -> (\b -> (\f -> f a b)))
> 
> Here is an example that uses cons to construct "hello"
> 
> hello = cons 'h' (cons 'e' (cons 'l' (cons 'l' 'o')))
> 
> And here is a lambda expression that returns the tail of a list created using 
> cons:
> 
> tail' = (\c -> c (\a -> (\b -> b)))
> 
> I would like to create a function that computes the length of a cons-created 
> list:
> 
> length' = \xs -> if ( null' xs ) then 0 else length' (tail' xs) + 1
> 
> How would I define null' to determine if a cons list is empty?
> 
> null' = ???
> 
> 
> /Roger
> 
> _______________________________________________
> 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/20111024/46b2cf55/attachment-0001.htm>

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

Message: 4
Date: Mon, 24 Oct 2011 22:57:41 +0200
From: Gary Klindt <[email protected]>
Subject: Re: [Haskell-beginners] cabal install happstack
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Thank you very much for your answers!

When I check dependency problems

>  ghc-pkg check
I get no answer.

I tried to hide the containers package which I had installed:
>  ghc-pkg hide container...

It did not help, same error message.
Then I tried
>  cabal install --constraint="deepseq>  1.1.0.0" happstack

I was able to install this way. But:
I was not able to compile the simple Hello Happstack example ...

After all, I removed everything (ghc, haskell platform and cabal packages) and 
reinstalled a newer version of ghc 7.0.3.

Everything is working fine, now.

On 10/24/2011 02:11 AM, Daniel Fischer wrote:

> On Monday 24 October 2011, 01:37:19, Gary Klindt wrote:
>> Hey Haskellers,
>>
>> I tried to install happstack. Unfortunately I get the following error:
>>   >  cabal install happstack
>>
>> -Resolving dependencies...
>> -cabal: cannot configure deepseq-1.1.0.0. It requires containers>=0.2
>> &&  <0.4
>> -For the dependency on containers>=0.2&&  <0.4 there are these
>> packages: -containers-0.2.0.0, containers-0.2.0.1 and
>> containers-0.3.0.0. However none of them are available.
>> -containers-0.2.0.0 was excluded because containers-0.4.1.0 was selected
>> instead
>> -containers-0.2.0.1 was excluded because containers-0.4.1.0 was selected
>> instead
>> -containers-0.3.0.0 was excluded because containers-0.4.1.0 was selected
>> instead
> Since ghc-6.12.* cam with containers-0.3.0.0, this means you have installed
> a newer version of containers.
> That is generally not a good idea.
> containers is one of the boot packages, ghc depends on it and thus many of
> the packages you install will depend on the version that came with ghc.
>
> Run
>
> $ ghc-pkg check
>
> to see whether you already have some broken packages.
>
>> I wanted to deselect containers:
>>   >  ghc-pkg unregister containers-0.4.1.0
>>
>> -ghc-pkg: unregistering containers-0.4.1.0 would break the following
>> packages: Cabal-1.10.2.0 (use --force to override)
> Hm, a bit strange, Cabal's dependencies list only base and filepath on
> hackage, although it also depends on containers, array, directory...
> Anyway, your upgraded Cabal was built against containers-0.4.1.0, so it
> will break without that.
>
>> But I did not want to use the force option, because I like cabal, and
>> don't want to break it.
> Is it Cabal the library or cabal the executable?
> If the latter, once it's built, it doesn't need the Cabal version it was
> built with to be present.
>
>> What should I do?
> You could try
>
> a) installing happstack with a constraint on the containers version to use,
> $ cabal install --constraint="containers<  0.4" happstack
> If nothing but Cabal on your system depends on containers-0.4.1.0 yet, that
> would probably work, but that would leave your installation open to
> breakage due to conflicting containers dependencies.
>
> b) installing happstack with a later deepseq,
> $ cabal install --constraint="deepseq>  1.1.0.0"
>
> c) unregister Cabal-1.10.2.0, then containers-0.4.1.0, then reinstall
> Cabal-1.10.2 (--dry-run first, to check whether that would want to
> reinstall a new containers) [but you could also decide to use the
> Cabal-1.8.* that came with your ghc].
>
>>   >  ghc --version
>>
>> -6.12.1
>>
>> Greets
>> Gary




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

Message: 5
Date: Mon, 24 Oct 2011 16:25:47 -0700
From: Bryce Verdier <[email protected]>
Subject: Re: [Haskell-beginners] List of all prelude function types?
To: Patrick LeBoutillier <[email protected]>
Cc: beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Here you go:
http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html

You can also find it in your locale documentation.

Bryce
On Oct 19, 2011, at 10:25 AM, Patrick LeBoutillier wrote:

> Hi,
> 
> Does anyone know where I can find a list of types for all Prelude
> functions? Something like:
> 
> all :: (a -> Bool) -> [a] -> Bool
> and :: [Bool] -> Bool
> ...
> zip :: [a] -> [b] -> [(a, b)]
> 
> 
> Thanks,
> 
> Patrick
> -- 
> =====================
> Patrick LeBoutillier
> Rosem?re, Qu?bec, Canada
> 
> _______________________________________________
> 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/20111024/219b088b/attachment-0001.htm>

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

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


End of Beginners Digest, Vol 40, Issue 38
*****************************************

Reply via email to