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:  cabal install errors & issues (Gregory Guthrie)
   2.  Backtrace when a certain location in the code    is executed
      (Nathan H?sken)
   3. Re:  cabal install errors & issues (Benjamin Edwards)
   4. Re:  Backtrace when a certain location in the code is
      executed (Bryce Verdier)
   5. Re:  cabal install errors & issues (Gregory Guthrie)
   6. Re:  cabal install errors & issues (Benjamin Edwards)
   7. Re:  source code for "Generics for the Masses" (Stephen Tetley)


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

Message: 1
Date: Thu, 16 Aug 2012 08:18:31 -0500
From: Gregory Guthrie <guth...@mum.edu>
Subject: Re: [Haskell-beginners] cabal install errors & issues
To: "beginners@haskell.org" <beginners@haskell.org>
Message-ID:
        <08ef9da445c4b5439c4733e1f35705ba01e267667...@mail.cs.mum.edu>
Content-Type: text/plain; charset="us-ascii"

Thanks for the advice and pointers, I will try to make this transition, but it 
looks like it is not so simple.

Trying to bootstrap into cabal-dev seems to require some external installations 
as well;

    >>cabal install cabal-dev --force-reinstalls
   ...
   Configuring network-2.3.0.14...
   cabal: The package has a './configure' script. This requires a Unix
   compatibility toolchain such as MinGW+MSYS or Cygwin.
   cabal: Error: some packages failed to install:
   HTTP-4000.2.3 depends on network-2.3.0.14 which failed to install.
   cabal-dev-0.9.1 depends on network-2.3.0.14 which failed to install.
   network-2.3.0.14 failed during the configure step. The exception was:
   ExitFailure 1

I do have MinGW+MSYS installed, might be a PATH issue, I'll check further.

I don't understand the details of Haskell package management, and the 
implications of this description of cabal-dev:

       For installed packages, the sandboxing means that packages are not 
registered into the user or global ghc package database.
      The global package db is used, so it is recommended that the global 
package db is only used for the ghc core libraries. 
      This approach conflicts with using distribution packages for non-core 
libraries, because they are installed into the global db.

It seems odd to me to say that "they are not registered.." into either 
database, and then say the global package db is used. Is there some distinction 
here between a "global ghc package db" & a "global package db"?.

Cabal install hsenv shows "no such package", and I'm not sure why using it with 
installs would be good.

Already removing shadowing packages is breaking things, so more cleanup will 
also be needed for that.

I am trying to convert some SML classes and labs for my students to Haskell, 
and all of this overhead is certainly something that I couldn't wish on them! 
Perhaps if I have them all start with cabal-dev none of this would happen?

-------------------------------------------
> > Please see this:
> >> http://ivanmiljenovic.wordpress.com/2010/03/15/repeat-after-me-cabal-
> >> is-not-a-package-manager/
> >
> > thanks Benjamin, for the cabal-dev, hsenv tip though.



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

Message: 2
Date: Thu, 16 Aug 2012 16:31:47 +0200
From: Nathan H?sken <nathan.hues...@posteo.de>
Subject: [Haskell-beginners] Backtrace when a certain location in the
        code    is executed
To: beginners@haskell.org
Message-ID: <502d0453.7060...@posteo.de>
Content-Type: text/plain; charset=ISO-8859-1

Hey,

I am trying to understand haskell program not written by me.
During runtime one function is called with parameters which makes the
function throw an error. I want to know from where the function is called.

In c++ I would set a breakpoint on the error throwing code, and let gdb
print the backtrace.
To I have similar options in haskell?
What other options do I have?

Thanks!
Nathan



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

Message: 3
Date: Thu, 16 Aug 2012 15:47:32 +0100
From: Benjamin Edwards <edwards.b...@gmail.com>
Subject: Re: [Haskell-beginners] cabal install errors & issues
To: Gregory Guthrie <guth...@mum.edu>
Cc: "beginners@haskell.org" <beginners@haskell.org>
Message-ID:
        <can6k4nhsbzwjmy8cbkuf9cvwi20gx+tf6pca0ziqwy0xaoo...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Ahh, I think network is a pain to build on Windows. I don't as a rule do
any haskell on windows because of the headaches of msys / mingw.

As to cabal-dev:

I don't think I even know what the paragraph means either. The short of it
is this:

You have packages that are globally registered with ghc, and packages that
are registered on a per user basis. When you call cabal-dev install foo it
makes a build dir called cabal-dev (you can change that) and builds foo in
there and installs + registers and deps that weren't in the global or user
database in there.

*phew*

hsenv: I forget that this is called virthualenv on hackage. It also allows
for sandboxing. Cabal-dev is probably easiest to start with.

You might want to read this:

http://www.reddit.com/r/haskell/comments/f3ykj/psa_use_cabaldev_to_solve_dependency_problems/
On Aug 16, 2012 2:21 PM, "Gregory Guthrie" <guth...@mum.edu> wrote:

> Thanks for the advice and pointers, I will try to make this transition,
> but it looks like it is not so simple.
>
> Trying to bootstrap into cabal-dev seems to require some external
> installations as well;
>
>     >>cabal install cabal-dev --force-reinstalls
>    ...
>    Configuring network-2.3.0.14...
>    cabal: The package has a './configure' script. This requires a Unix
>    compatibility toolchain such as MinGW+MSYS or Cygwin.
>    cabal: Error: some packages failed to install:
>    HTTP-4000.2.3 depends on network-2.3.0.14 which failed to install.
>    cabal-dev-0.9.1 depends on network-2.3.0.14 which failed to install.
>    network-2.3.0.14 failed during the configure step. The exception was:
>    ExitFailure 1
>
> I do have MinGW+MSYS installed, might be a PATH issue, I'll check further.
>
> I don't understand the details of Haskell package management, and the
> implications of this description of cabal-dev:
>
>        For installed packages, the sandboxing means that packages are not
> registered into the user or global ghc package database.
>       The global package db is used, so it is recommended that the global
> package db is only used for the ghc core libraries.
>       This approach conflicts with using distribution packages for
> non-core libraries, because they are installed into the global db.
>
> It seems odd to me to say that "they are not registered.." into either
> database, and then say the global package db is used. Is there some
> distinction here between a "global ghc package db" & a "global package db"?.
>
> Cabal install hsenv shows "no such package", and I'm not sure why using it
> with installs would be good.
>
> Already removing shadowing packages is breaking things, so more cleanup
> will also be needed for that.
>
> I am trying to convert some SML classes and labs for my students to
> Haskell, and all of this overhead is certainly something that I couldn't
> wish on them! Perhaps if I have them all start with cabal-dev none of this
> would happen?
>
> -------------------------------------------
> > > Please see this:
> > >> http://ivanmiljenovic.wordpress.com/2010/03/15/repeat-after-me-cabal-
> > >> is-not-a-package-manager/
> > >
> > > thanks Benjamin, for the cabal-dev, hsenv tip though.
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120816/76386a65/attachment-0001.htm>

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

Message: 4
Date: Thu, 16 Aug 2012 10:05:50 -0700
From: Bryce Verdier <bryceverd...@gmail.com>
Subject: Re: [Haskell-beginners] Backtrace when a certain location in
        the code is executed
To: beginners@haskell.org
Message-ID: <502d286e.90...@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I'm aware of :break in ghci, and I've used it for "little" functions 
that I was trying to understand. I'm not sure how well it'll work for a 
large project though.

This is the "debugging" section in ghci when you type ":help":
  -- Commands for debugging:

    :abandon                    at a breakpoint, abandon current computation
    :back                       go back in the history (after :trace)
    :break [<mod>] <l> [<col>]  set a breakpoint at the specified location
    :break <name>               set a breakpoint on the specified function
    :continue                   resume after a breakpoint
    :delete <number>            delete the specified breakpoint
    :delete *                   delete all breakpoints
    :force <expr>               print <expr>, forcing unevaluated parts
    :forward                    go forward in the history (after :back)
    :history [<n>]              after :trace, show the execution history
    :list                       show the source code around current 
breakpoint
    :list identifier            show the source code for <identifier>
    :list [<module>] <line>     show the source code around line number 
<line>
    :print [<name> ...]         prints a value without forcing its 
computation
    :sprint [<name> ...]        simplifed version of :print
    :step                       single-step after stopping at a breakpoint
    :step <expr>                single-step into <expr>
    :steplocal                  single-step within the current top-level 
binding
    :stepmodule                 single-step restricted to the current module
    :trace                      trace after stopping at a breakpoint
    :trace <expr>               evaluate <expr> with tracing on (see 
:history)

I hope this helps.

Bryce
On 8/16/12 7:31 AM, Nathan H?sken wrote:
> Hey,
>
> I am trying to understand haskell program not written by me.
> During runtime one function is called with parameters which makes the
> function throw an error. I want to know from where the function is called.
>
> In c++ I would set a breakpoint on the error throwing code, and let gdb
> print the backtrace.
> To I have similar options in haskell?
> What other options do I have?
>
> Thanks!
> Nathan
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners





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

Message: 5
Date: Thu, 16 Aug 2012 12:25:50 -0500
From: Gregory Guthrie <guth...@mum.edu>
Subject: Re: [Haskell-beginners] cabal install errors & issues
To: Benjamin Edwards <edwards.b...@gmail.com>
Cc: "beginners@haskell.org" <beginners@haskell.org>
Message-ID:
        <08ef9da445c4b5439c4733e1f35705ba01e267667...@mail.cs.mum.edu>
Content-Type: text/plain; charset="us-ascii"

Thanks for the clarification and info.

>From this I then deduce:
  Using "cabal install" is dangerous, and leads to broken package structure 
(inconsistent package versions and shadowing).
  Better to use cabal-dev,
    But it requires network, which is external to Haskell, and a pain to build 
(on windows)...

Thus, no good solution on Windows - is this right?

Since Windows is 94%+ of computing environments today (all of our labs use 
Windows, and "standard" IDEs), then Haskell is not a good fit?
We want to use Windows since that is what students will generally see in their 
professional environments.

I hope not...!!  :-) 

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

>> Ahh, I think network is a pain to build on Windows.
>>  I don't as a rule do any haskell on windows because of the headaches of 
>> msys / mingw.



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

Message: 6
Date: Thu, 16 Aug 2012 18:50:26 +0100
From: Benjamin Edwards <edwards.b...@gmail.com>
Subject: Re: [Haskell-beginners] cabal install errors & issues
To: Gregory Guthrie <guth...@mum.edu>
Cc: "beginners@haskell.org" <beginners@haskell.org>
Message-ID:
        <CAN6k4ngOPxeyqLngfJ9=1xgujbBcLR23xxHN4wGc2CQ=2f9...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

It really depends on what you are looking to teach!

For professional dev with lots of packages and different projects then
sandboxing is a must.

I imagine for a lab you could get away with what's in the haskell platform.
I got cabal-dev going on a windows box not too long ago. When I get home I
will have a tinker.

I am sure someone with more windows experience than I can chime in.
On Aug 16, 2012 6:28 PM, "Gregory Guthrie" <guth...@mum.edu> wrote:

> Thanks for the clarification and info.
>
> From this I then deduce:
>   Using "cabal install" is dangerous, and leads to broken package
> structure (inconsistent package versions and shadowing).
>   Better to use cabal-dev,
>     But it requires network, which is external to Haskell, and a pain to
> build (on windows)...
>
> Thus, no good solution on Windows - is this right?
>
> Since Windows is 94%+ of computing environments today (all of our labs use
> Windows, and "standard" IDEs), then Haskell is not a good fit?
> We want to use Windows since that is what students will generally see in
> their professional environments.
>
> I hope not...!!  :-)
>
> -------------------------------------------------------
>
> >> Ahh, I think network is a pain to build on Windows.
> >>  I don't as a rule do any haskell on windows because of the headaches
> of msys / mingw.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120816/817c345d/attachment-0001.htm>

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

Message: 7
Date: Thu, 16 Aug 2012 19:12:12 +0100
From: Stephen Tetley <stephen.tet...@gmail.com>
Subject: Re: [Haskell-beginners] source code for "Generics for the
        Masses"
To: Michael Litchard <mich...@schmong.org>
Cc: beginners@haskell.org
Message-ID:
        <cab2tprbbblsestthohdje_dmhabxxnb0z-wmpqxkv0zh4hx...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello Michael

Here's a copy - at 8KB it doesn't seem _too_ heinous to post it to the list.



On 16 August 2012 01:03, Michael Litchard <mich...@schmong.org> wrote:
> In the paper by Ralf Hinze, "Generics for the Masses", there is
> reference to code one may play with. But the link,
> http://www.ralf-hinze.de/masses.tar.bz2 is dead. I know someone,
> somewhere has this file. Could you point me to where it lives?
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
-------------- next part --------------
A non-text attachment was scrubbed...
Name: masses.tar.bz2
Type: application/x-bzip2
Size: 7928 bytes
Desc: not available
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120816/bd91c833/attachment.bin>

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

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


End of Beginners Digest, Vol 50, Issue 18
*****************************************

Reply via email to