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.  using both my personal .hs and a library simultaneously +
      seeing a function (Alexander Chen)
   2. Re:  using both my personal .hs and a library simultaneously
      + seeing a function (Ut Primum)
   3. Re:  using both my personal .hs and a library simultaneously
      + seeing a function (Norbert Melzer)


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

Message: 1
Date: Thu, 30 Jan 2020 14:29:30 +0100 (CET)
From: Alexander Chen <alexan...@chenjia.nl>
To: beginners@haskell.org
Subject: [Haskell-beginners] using both my personal .hs and a library
        simultaneously + seeing a function
Message-ID: <1705802852.567929.1580390970...@ichabod.co-bxl>
Content-Type: text/plain; charset="utf-8"

Hi,

1) I have my own functions in a .hs file which i can load in winGCHI and use 
the functions without a problem. But I also need 1 function from a hackage 
library, which I have downloaded in my haskell folder. I can 'toggle' between 
both my personal .hs and the library but I cannot use them both at the same 
time. The library is Primes(just for clarity). How can I merge these two so I 
can continue my training?

2) Is there a way to see a function if you call it in winGCHI. I don't mean the 
type structure which you do with :t but really the function itself for 
instance(see bold):

circular_times :: Int -> [Int]
circular_times n = take (length (show n)) (iterate circular n)

thanks in advance.

best,

Alexander 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20200130/ef317c9b/attachment-0001.html>

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

Message: 2
Date: Thu, 30 Jan 2020 15:07:20 +0100
From: Ut Primum <utpri...@gmail.com>
To: Alexander Chen <alexan...@chenjia.nl>,  The Haskell-Beginners
        Mailing List - Discussion of primarily beginner-level topics related
        to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] using both my personal .hs and a
        library simultaneously + seeing a function
Message-ID:
        <canjdmkku1unuks1ee3j+qjt4_0p+uhxaoyznsronks1zmgk...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,

1) I'm not sure this is what you are looking for, but you could import the
module Primes (write "import Primes" at the beginning) in your .hs script,
so when loading the script you would load also Primes.

Another way:
*:load yourFile.hs*
*:module +Primes*

2) you can try with
*:list circular_times*
(This should print the line where the word "circular_times" appears for the
first time, the line before and after it)

Best,
Ut

Il gio 30 gen 2020, 14:29 Alexander Chen <alexan...@chenjia.nl> ha scritto:

> Hi,
>
> 1) I have my own functions in a .hs file which i can load in winGCHI and
> use the functions without a problem. But I also need 1 function from a
> hackage library, which I have downloaded in my haskell folder. I can
> 'toggle' between both my personal .hs and the library but I cannot use them
> both at the same time. The library is Primes(just for clarity). How can I
> merge these two so I can continue my training?
>
> 2) Is there a way to see a function if you call it in winGCHI. I don't
> mean the type structure which you do with :t but really the function itself
> for instance(see bold):
>
> circular_times :: Int -> [Int]
> *circular_times n = take (length (show n)) (iterate circular n)*
>
>
> thanks in advance.
>
> best,
>
> Alexander
> _______________________________________________
> 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/20200130/92f297b2/attachment-0001.html>

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

Message: 3
Date: Thu, 30 Jan 2020 15:08:58 +0100
From: Norbert Melzer <timmel...@gmail.com>
To: Alexander Chen <alexan...@chenjia.nl>,  The Haskell-Beginners
        Mailing List - Discussion of primarily beginner-level topics related
        to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] using both my personal .hs and a
        library simultaneously + seeing a function
Message-ID:
        <ca+bcvss7abgfm+aeqcegzcrxpbbrygetlysyj3k8k_pxwb+...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Thu, Jan 30, 2020 at 2:29 PM Alexander Chen <alexan...@chenjia.nl> wrote:

> Hi,
>
> 1) I have my own functions in a .hs file which i can load in winGCHI and
> use the functions without a problem. But I also need 1 function from a
> hackage library, which I have downloaded in my haskell folder. I can
> 'toggle' between both my personal .hs and the library but I cannot use them
> both at the same time. The library is Primes(just for clarity). How can I
> merge these two so I can continue my training?
>

Do you use a stack or cabal project or a plain file collection?

For a stack or cabal project you need to properly define it as a
dependency, for plain files I'm not quite sure how it works, but I'd
experiment with the `-i` argument to adjust the search path.


>
>
2) Is there a way to see a function if you call it in winGCHI. I don't mean
> the type structure which you do with :t but really the function itself for
> instance(see bold):
>
> circular_times :: Int -> [Int]
> *circular_times n = take (length (show n)) (iterate circular n)*
>

Not that I am aware off.


>
>
> thanks in advance.
>
> best,
>
> Alexander
> _______________________________________________
> 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/20200130/721ed34f/attachment-0001.html>

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

Subject: Digest Footer

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


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

End of Beginners Digest, Vol 139, Issue 9
*****************************************

Reply via email to