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: emacs + ghc-mod + cabal repl (Mateusz Kowalczyk)
2. Re: cabal install (Brent Yorgey)
3. Re: cabal install (Andres L?h)
4. Re: emacs + ghc-mod + cabal repl (Miguel Negr?o)
5. Re: cabal install (Kim-Ee Yeoh)
6. Re: cabal install (Brent Yorgey)
7. Re: cabal install (Brandon Allbery)
8. Re: Ambiguous type variables (Dennis Raddle)
----------------------------------------------------------------------
Message: 1
Date: Tue, 18 Mar 2014 15:49:49 +0000
From: Mateusz Kowalczyk <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] emacs + ghc-mod + cabal repl
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
On 18/03/14 11:53, Miguel Negr?o wrote:
> Hi
>
> Can anyone tell me how switch from using ghci to cabal repl in emacs
> with ghc-mod ? I would like to use emacs with cabal projects with
> sandboxes, where ghci will not load the right packages.
>
> best,
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
Personally I evaluate (setq haskell-program-name "cabal repl") . Make
sure you are in the same directory as the cabal file when you first
start up the REPL. If you get complaints about not being able to find
prompt, check the *haskell* buffer that gets created in the background
to see what's going wrong.
--
Mateusz K.
------------------------------
Message: 2
Date: Tue, 18 Mar 2014 13:02:11 -0400
From: Brent Yorgey <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] cabal install
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1
On Tue, Mar 18, 2014 at 11:54:21AM +0100, Andres L?h wrote:
> Hi.
>
> > After doing whatever it wants to do, successfully (at least that's what I
> > think the logs say; I didn't notice any error) I update my path to:
> > export PATH=/home/.../.cabal/bin:$PATH
> >
> > Everything is "OK" now! But I still don't have a cabal-install binary, and
> > this update has been performed only for me (inside my user account)!
> >
> > Shouldn't I have a binary cabal-install to run?
>
> The binary is called "cabal", not "cabal-install". You should be able
> to check whether the new version is being used by saying "cabal
> --version".
>
> > How can I update globally? (for all users of the system!)
>
> By saying something like "sudo cabal install --global
> cabal-install".
Incidentally, it's better to say
cabal install --root-cmd=sudo --global cabal-install
That way, cabal will only acquire root privileges for the
installation. It does not need to run as root for the entire
downloading, building, etc. process, and in fact doing so can be bad,
since it pollutes your package cache with files owned by root, leading
to potential permissions problems in the future.
-Brent
------------------------------
Message: 3
Date: Tue, 18 Mar 2014 19:27:30 +0100
From: Andres L?h <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] cabal install
Message-ID:
<caljd_v53ra2ac8e2ncl4dl4ac65covdpr3+m_8ivufg4vjf...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi Brent.
>> By saying something like "sudo cabal install --global
>> cabal-install".
>
> Incidentally, it's better to say
>
> cabal install --root-cmd=sudo --global cabal-install
Ah yes, absolutely true. Thanks for pointing this out. I never
actually run "cabal install --global" manually, so I forgot that this
is possible.
Cheers,
Andres
------------------------------
Message: 4
Date: Tue, 18 Mar 2014 18:47:10 +0000
From: Miguel Negr?o <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] emacs + ghc-mod + cabal repl
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Em 18-03-2014 15:49, Mateusz Kowalczyk escreveu:
> (setq haskell-program-name "cabal repl")
thanks, that works.
best,
Miguel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140318/cf2460bc/attachment-0001.sig>
------------------------------
Message: 5
Date: Wed, 19 Mar 2014 03:04:26 +0700
From: Kim-Ee Yeoh <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] cabal install
Message-ID:
<capy+zdr-_8b5pxufdobtmht2zsupgrannr0pywsdhj-ho_n...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
On Wed, Mar 19, 2014 at 12:02 AM, Brent Yorgey <[email protected]>wrote:
> cabal install --root-cmd=sudo --global cabal-install
>
> That way, cabal will only acquire root privileges for the
> installation. It does not need to run as root for the entire
> downloading, building, etc. process, and in fact doing so can be bad,
> since it pollutes your package cache with files owned by root, leading
> to potential permissions problems in the future.
>
Oh my. This is some long magical incantation.
Is this documented somewhere? At least in the cabal faq?
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140319/9f16094d/attachment-0001.html>
------------------------------
Message: 6
Date: Tue, 18 Mar 2014 16:39:34 -0400
From: Brent Yorgey <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] cabal install
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Wed, Mar 19, 2014 at 03:04:26AM +0700, Kim-Ee Yeoh wrote:
> On Wed, Mar 19, 2014 at 12:02 AM, Brent Yorgey <[email protected]>wrote:
>
> > cabal install --root-cmd=sudo --global cabal-install
> >
> > That way, cabal will only acquire root privileges for the
> > installation. It does not need to run as root for the entire
> > downloading, building, etc. process, and in fact doing so can be bad,
> > since it pollutes your package cache with files owned by root, leading
> > to potential permissions problems in the future.
> >
>
> Oh my. This is some long magical incantation.
>
> Is this documented somewhere? At least in the cabal faq?
I don't know, I learned it from Duncan Coutts.
For the record, I don't actually recommend that people do this. I can
only think of a few situations where this is really what you want to
do (e.g. if you are setting up a multi-user system that students in a
class are going to use). More typically, you should leave the Haskell
Platform in your global package DB and then install everything else in
your local user DB. That makes it much easier to start over if things
get messed up, without having to reinstall the Haskell Platform. For
something like cabal-install which is just an executable, if you want
to make it available globally it is easy enough to build it locally
and then copy it somewhere to make it available.
-Brent
------------------------------
Message: 7
Date: Tue, 18 Mar 2014 17:06:12 -0400
From: Brandon Allbery <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] cabal install
Message-ID:
<CAKFCL4UuGMT1SQBy5k1peMyqopZ-1dG3X=cktue-wg3ivFB7=q...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Tue, Mar 18, 2014 at 4:04 PM, Kim-Ee Yeoh <[email protected]> wrote:
>
> On Wed, Mar 19, 2014 at 12:02 AM, Brent Yorgey <[email protected]>wrote:
>
>> cabal install --root-cmd=sudo --global cabal-install
>>
> Oh my. This is some long magical incantation.
> Is this documented somewhere? At least in the cabal faq?
>
Probably not since it's strongly disrecommended to do global installs.
--
brandon s allbery kf8nh sine nomine associates
[email protected] [email protected]
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140318/466891cf/attachment-0001.html>
------------------------------
Message: 8
Date: Tue, 18 Mar 2014 18:47:31 -0700
From: Dennis Raddle <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Ambiguous type variables
Message-ID:
<cakxlvorqz_oiuzfkmowef7h+amf9oszkpezngych3emmcbx...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I have another question, speaking of optimizing too soon. My data
structures will be things like rows of musical notes, implementable easily
as lists of lists. But I will often need to do things like replace one
element in a list. Should I use Array's? As I see it, lists get me certain
simplicity, and many operations using the natural syntax will be concise.
But then I'll have to do searches or random access and replacement.
What criteria does one use to make decisions like this? Do the easiest one
first and optimize later? I'm not even sure which is easiest as I don't
think there is a list element replacement function in the libraries.
On Mon, Mar 17, 2014 at 3:56 PM, Dennis Raddle <[email protected]>wrote:
>
>
>
> On Mon, Mar 17, 2014 at 1:28 PM, Kim-Ee Yeoh <[email protected]> wrote:
>
>>
>> On Tue, Mar 18, 2014 at 2:14 AM, Dennis Raddle
>> <[email protected]>wrote:
>>
>>> class Bt d c memo | d -> c, d -> memo where
>>
>>
>> Could you also say something about the instances you intend to implement
>> for this typeclass?
>>
>> If there's only 1, which the statement of the problem suggests as much,
>> you can dispense of the typeclass entirely and just work with plain
>> functions!
>>
>> Could be that you want something working first and generalize /
>> polymorphize later.
>>
>
>
> I don't know yet how I want to represent the solution being searched for;
> i.e. I don't know how I want to represent musical structures, and I need
> the freedom to try different ones without rewriting my code. I also wanted
> to implement a few toy problems to do testing on my algorithm.
>
> But, you are absolutely right that I am generalizing too quickly. I worked
> on a toy problem today and had several insights. I noticed that some
> problems have specifics that don't fit the same mold.
> -Dennis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140318/38cc5b5e/attachment.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 69, Issue 24
*****************************************