Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/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:  Stack minimal dependency specification,      or dependency
      tree output (Josh Barney)
   2. Re:  Stack minimal dependency specification, or dependency
      tree output (Lyndon Maydwell)
   3. Re:  Stack minimal dependency specification, or dependency
      tree output (Simon Jakobi)
   4. Re:  The (x:xs) in function parameter is a tuple? (Nan Xiao)
   5. Re:  Stack minimal dependency specification, or dependency
      tree output (Lyndon Maydwell)
   6. Re:  The (x:xs) in function parameter is a tuple?
      (Imants Cekusins)


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

Message: 1
Date: Wed, 24 Feb 2016 17:28:52 -0500
From: Josh Barney <bayesra...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] Stack minimal dependency
        specification,  or dependency tree output
Message-ID: <7dcde7b1-89f6-471e-9327-f4dacac29...@gmail.com>
Content-Type: text/plain;       charset=us-ascii



> On Feb 24, 2016, at 5:10 PM, Lyndon Maydwell <maydw...@gmail.com> wrote:
> 
> Hi Mark,
> 
> 
> That would be great, and I have tried that, but there is one issue that 
> caused me to take the current approach instead.
> 
> The issue is that every change to
> 
> * Setup.hs
> * simple-app.cabal
> * stack.yaml
> 
> will cause the docker to consider the copy statement
> 
> > COPY LICENSE Setup.hs simple-app.cabal stack.yaml /app/
> 
> as a fresh checkpoint, and make the cache unusable. Since I've frequently 
> changing stack.yaml, and app.cabal, this won't help me much.
> 
> Not sure if there's a way around that with this method.
> 
> Let me know if I've overlooked something with your approach!
> 
> 
>  - Lyndon
>> 

I have found that it works well to use a dummy file that does not change in 
order to set up a cache. You can then copy over the real file; preserving the 
cached docker layer.

Josh

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

Message: 2
Date: Thu, 25 Feb 2016 09:33:06 +1100
From: Lyndon Maydwell <maydw...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] Stack minimal dependency
        specification, or dependency tree output
Message-ID:
        <CAM5QZtwc39k4RJr52QNGAaenDF898JVVCiiVaPt=xwc_b1d...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Awesome!

I'll give that a go.


Thanks,


  - Lyndon

On Thu, Feb 25, 2016 at 9:28 AM, Josh Barney <bayesra...@gmail.com> wrote:

>
>
> > On Feb 24, 2016, at 5:10 PM, Lyndon Maydwell <maydw...@gmail.com> wrote:
> >
> > Hi Mark,
> >
> >
> > That would be great, and I have tried that, but there is one issue that
> caused me to take the current approach instead.
> >
> > The issue is that every change to
> >
> > * Setup.hs
> > * simple-app.cabal
> > * stack.yaml
> >
> > will cause the docker to consider the copy statement
> >
> > > COPY LICENSE Setup.hs simple-app.cabal stack.yaml /app/
> >
> > as a fresh checkpoint, and make the cache unusable. Since I've
> frequently changing stack.yaml, and app.cabal, this won't help me much.
> >
> > Not sure if there's a way around that with this method.
> >
> > Let me know if I've overlooked something with your approach!
> >
> >
> >  - Lyndon
> >>
>
> I have found that it works well to use a dummy file that does not change
> in order to set up a cache. You can then copy over the real file;
> preserving the cached docker layer.
>
> Josh
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160225/a730b52e/attachment-0001.html>

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

Message: 3
Date: Wed, 24 Feb 2016 23:55:49 +0100
From: Simon Jakobi <simon.jak...@googlemail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] Stack minimal dependency
        specification, or dependency tree output
Message-ID:
        <cagtp2siuwhs75hgnhr+8p8llxn3gjzugunn9r-d92adej4r...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Lyndon,

I'd like to see some kind of tree instead, so that when I pre-install the
> dependencies, I can specify a minimal list, rather than a whole slew of
> dependencies that would be pulled in transitively anyway.


There's "stack list-dependencies" but that includes the transitive
dependencies.

You can get the dependency tree (or rather dependency graph) with "stack
dot --external"

"stack dot --external --depth 0" will show only the direct dependencies of
your project.

More stack dot examples:
http://docs.haskellstack.org/en/stable/dependency_visualization/

Cheers,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160224/fce910a0/attachment-0001.html>

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

Message: 4
Date: Thu, 25 Feb 2016 07:49:56 +0800
From: Nan Xiao <xiaonan830...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] The (x:xs) in function parameter is a
        tuple?
Message-ID:
        <ca+mhoaow8nr8u04m4jh88xraek5tae4e7bv-y9s0wgpya9w...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi all,

Firstly, thanks very much for all responses!

Rein referred "A tuple can have any number of elements", while Graham
referred "There's no "one-ple", or 1-tuple, in Haskell.". So which one
is right? The tuple at least contains 2 elements?

Thanks very much in advance!
Best Regards
Nan Xiao


On Thu, Feb 25, 2016 at 2:37 AM, Graham Gill <math.simp...@gmail.com> wrote:
> Hi Nan, are you just confused about the use of the parentheses "(" and ")"?
>
> (x1,x2), (x1,x2,x3), ... are tuples in Haskell, but (x:xs) is not. (There's
> no "one-ple", or 1-tuple, in Haskell.) In
>
> occurs value [] = 0
> occurs value (x:xs) = (if value == x then 1 else 0) + occurs value xs
>
> the "(" and ")" around "x:xs" are just there for grouping, for operator
> precedence reasons. Function application binds more tightly than ":". If you
> leave the parentheses off, such as in
>
> occurs value x:xs = ...
>
> you'll get a parse error.
>
> Graham
>
>
>
> On 2/24/2016 5:31 AM, Nan Xiao wrote:
>>
>> Hi all,
>>
>> Greetings from me!
>>
>> I am confused about the function parameters and tuple. E.g.:
>>
>> occurs value [] = 0
>> occurs value (x:xs) = (if value == x then 1 else 0) + occurs value xs
>>
>> should we consider (x:xs) as a tuple?
>>
>> Thanks in advance!
>>
>> Best Regards
>> Nan Xiao
>> _______________________________________________
>> Beginners mailing list
>> Beginners@haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


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

Message: 5
Date: Thu, 25 Feb 2016 10:58:14 +1100
From: Lyndon Maydwell <maydw...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] Stack minimal dependency
        specification, or dependency tree output
Message-ID:
        <cam5qztxmw7qlv9j1x76xqp42bzrwmqsteh4pcm5na4qoooy...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Simon,


> stack dot --external --depth 0


That's exactly what I was first looking for!

Cheers :)


 - Lyndon

On Thu, Feb 25, 2016 at 9:55 AM, Simon Jakobi <simon.jak...@googlemail.com>
wrote:

> Hi Lyndon,
>
> I'd like to see some kind of tree instead, so that when I pre-install the
>> dependencies, I can specify a minimal list, rather than a whole slew of
>> dependencies that would be pulled in transitively anyway.
>
>
> There's "stack list-dependencies" but that includes the transitive
> dependencies.
>
> You can get the dependency tree (or rather dependency graph) with "stack
> dot --external"
>
> "stack dot --external --depth 0" will show only the direct dependencies of
> your project.
>
> More stack dot examples:
> http://docs.haskellstack.org/en/stable/dependency_visualization/
>
> Cheers,
> Simon
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160225/f710c37d/attachment-0001.html>

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

Message: 6
Date: Thu, 25 Feb 2016 01:02:02 +0100
From: Imants Cekusins <ima...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] The (x:xs) in function parameter is a
        tuple?
Message-ID:
        <CAP1qinao7B48OWpT526ck1WdSOCR=t9rk77gip32javbcsm...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

My guess is: tuple must contain 2+ elements.

Try to enter (1) in ghci. It is displayed as 1

Parentheses are only recognized as a tuple if there are elements separated
by a comma. Otherwise an expression is assumed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160225/6dfadf27/attachment.html>

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

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


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

End of Beginners Digest, Vol 92, Issue 30
*****************************************

Reply via email to