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.  Help getting glib installed (Britt Anderson)
   2. Re:  Help getting glib installed (Krzysztof Skrz?tnicki)
   3.  import literal haskell file (Nathan H?sken)
   4. Re:  import literal haskell file (Brandon Allbery)
   5. Re:  import literal haskell file (Nathan H?sken)
   6. Re:  import literal haskell file (Dan Lior)
   7.  recursive and non recursive functions (Dan Lior)


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

Message: 1
Date: Tue, 17 Sep 2013 08:32:04 -0400
From: Britt Anderson <britt.ander...@uwaterloo.ca>
To: <beginners@haskell.org>
Subject: [Haskell-beginners] Help getting glib installed
Message-ID: <8761tztyrf....@brittoffice.uwaterloo.ca>
Content-Type: text/plain

I sent this yesterday, but it never showed up on the list. I apologize
in advance if a repeated post appears, but I am rather stuck.

I am looking for help to figure out my problem with cabal install glib

I am starting fresh with ghc 7.6.3 built from source and cabal-install 1.18 
downloaded from hackage and installed using the sh bootstrap.sh command. All 
works fine, as far as I can tell (e.g ghci runs and cabal install 
gtk2hs-buildtools worked).

However in trying to cabal-install packages that depend on glib I am
having problems. I think I fixed the first problem which was a conflict
for the function name moreRecentFile. This exists in the SetupWrapper.hs
file, but is also now a part of Distribution.Simple.Utils. I edited the
SetupWrapper.hs and renamed its version of the function.

The next problem to appear was with the processing of Gtk2HsSetup.hs
file. The error is that constructor libraryConfig is not visible. I
think that this is because as of Cabal-1.18 this constructor is not a
part of Distribution.Simple.LocalBuildInfo. Is there some new accessor
function or other work around that is known, or is the problems
something else entirely? 


Thank you, /Britt


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

Message: 2
Date: Tue, 17 Sep 2013 14:53:08 +0200
From: Krzysztof Skrz?tnicki <gte...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] Help getting glib installed
Message-ID:
        <cam7aever3zex4jxe6nredvt3jyipqq-_qg2exsk0udywfww...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Cabal-1.18 was released very recently and packages that have custom build
scripts are quite likely to be broken with it.
If you dont need any features that this version brings you should be good
with installing cabal-install-1.16.0.2 instead.

You may also ask folks from GTK2HS about new version. I think most their
packages will need a fix for Cabal-1.18.


On Tue, Sep 17, 2013 at 2:32 PM, Britt Anderson <britt.ander...@uwaterloo.ca
> wrote:

> I sent this yesterday, but it never showed up on the list. I apologize
> in advance if a repeated post appears, but I am rather stuck.
>
> I am looking for help to figure out my problem with cabal install glib
>
> I am starting fresh with ghc 7.6.3 built from source and cabal-install
> 1.18 downloaded from hackage and installed using the sh bootstrap.sh
> command. All works fine, as far as I can tell (e.g ghci runs and cabal
> install gtk2hs-buildtools worked).
>
> However in trying to cabal-install packages that depend on glib I am
> having problems. I think I fixed the first problem which was a conflict
> for the function name moreRecentFile. This exists in the SetupWrapper.hs
> file, but is also now a part of Distribution.Simple.Utils. I edited the
> SetupWrapper.hs and renamed its version of the function.
>
> The next problem to appear was with the processing of Gtk2HsSetup.hs
> file. The error is that constructor libraryConfig is not visible. I
> think that this is because as of Cabal-1.18 this constructor is not a
> part of Distribution.Simple.LocalBuildInfo. Is there some new accessor
> function or other work around that is known, or is the problems
> something else entirely?
>
>
> Thank you, /Britt
> _______________________________________________
> 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/20130917/329a6541/attachment-0001.html>

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

Message: 3
Date: Wed, 18 Sep 2013 00:18:46 +0200
From: Nathan H?sken <nathan.hues...@posteo.de>
To: beginners@haskell.org
Subject: [Haskell-beginners] import literal haskell file
Message-ID: <5238d546.3040...@posteo.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hey,

When I do

import ModuleName

and have a file ModuleName.lhs (in literal haskell), ghc complains that 
it cannot find the module.

Is it somehow possible to import the lhs file without rewriting it?

Thanks!
Nathan


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

Message: 4
Date: Tue, 17 Sep 2013 18:34:03 -0400
From: Brandon Allbery <allber...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] import literal haskell file
Message-ID:
        <cakfcl4vac7tm2abtgkuf7hoeo1-eeghvdyln+zmnuwfmdfa...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Tue, Sep 17, 2013 at 6:18 PM, Nathan H?sken <nathan.hues...@posteo.de>wrote:

> import ModuleName
>
> and have a file ModuleName.lhs (in literal haskell), ghc complains that it
> cannot find the module.
>

(1) It's Literate Haskell, cf. Knuth's literate programming.
(2) It is not imported as source; it is looking for a compiled module
(specifically the .hi file).

-- 
brandon s allbery kf8nh                               sine nomine associates
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130917/7d4e004d/attachment-0001.html>

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

Message: 5
Date: Wed, 18 Sep 2013 08:28:37 +0200
From: Nathan H?sken <nathan.hues...@posteo.de>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] import literal haskell file
Message-ID: <52394815.9000...@posteo.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 09/18/2013 12:34 AM, Brandon Allbery wrote:
> On Tue, Sep 17, 2013 at 6:18 PM, Nathan H?sken <nathan.hues...@posteo.de
> <mailto:nathan.hues...@posteo.de>> wrote:
>
>     import ModuleName
>
>     and have a file ModuleName.lhs (in literal haskell), ghc complains
>     that it cannot find the module.
>
>
> (1) It's Literate Haskell, cf. Knuth's literate programming.
> (2) It is not imported as source; it is looking for a compiled module
> (specifically the .hi file).

Mmh, ok. The file is part of a cabal project.
So I have: Main.hs, Module.lhs, and main cannot find the module Module.
How do I instruct cabal to produce the needed hi file?

>
> --
> brandon s allbery kf8nh                               sine nomine associates
> allber...@gmail.com <mailto:allber...@gmail.com> ballb...@sinenomine.net
> <mailto:ballb...@sinenomine.net>
> unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>



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

Message: 6
Date: Wed, 18 Sep 2013 00:32:50 -0600
From: Dan Lior <sitipo...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] import literal haskell file
Message-ID: <36370cf2-c3dc-4a91-9a0b-bd5a607b2...@gmail.com>
Content-Type: text/plain; charset=iso-8859-1

I think that you're responding to the wrong person. 

dan

On Sep 18, 2013, at 12:28 AM, Nathan H?sken <nathan.hues...@posteo.de> wrote:

> On 09/18/2013 12:34 AM, Brandon Allbery wrote:
>> On Tue, Sep 17, 2013 at 6:18 PM, Nathan H?sken <nathan.hues...@posteo.de
>> <mailto:nathan.hues...@posteo.de>> wrote:
>> 
>>    import ModuleName
>> 
>>    and have a file ModuleName.lhs (in literal haskell), ghc complains
>>    that it cannot find the module.
>> 
>> 
>> (1) It's Literate Haskell, cf. Knuth's literate programming.
>> (2) It is not imported as source; it is looking for a compiled module
>> (specifically the .hi file).
> 
> Mmh, ok. The file is part of a cabal project.
> So I have: Main.hs, Module.lhs, and main cannot find the module Module.
> How do I instruct cabal to produce the needed hi file?
> 
>> 
>> --
>> brandon s allbery kf8nh                               sine nomine associates
>> allber...@gmail.com <mailto:allber...@gmail.com> ballb...@sinenomine.net
>> <mailto:ballb...@sinenomine.net>
>> unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
>> 
>> 
>> _______________________________________________
>> Beginners mailing list
>> Beginners@haskell.org
>> http://www.haskell.org/mailman/listinfo/beginners
>> 
> 
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners



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

Message: 7
Date: Wed, 18 Sep 2013 00:41:54 -0600
From: Dan Lior <sitipo...@gmail.com>
To: beginners@haskell.org
Subject: [Haskell-beginners] recursive and non recursive functions
Message-ID: <6dd78d3b-4cc8-495e-9d6a-1c6ee946f...@gmail.com>
Content-Type: text/plain; charset="windows-1252"

The following snippet is from a recent stack overflow post (by someone else). 



7
down vote
accept
I'd like to mention an important distinction:

cyclic' = [0,1] ++ cyclic'

cyclic'' = [0,1] ++ x
    where x = cyclic''
These two functions are recursive. But

cyclic = let x = 0 : y 
             y = 1 : x
         in x
is not! It uses x internally, which is recursive, but the whole cyclic isn't. 
This is also why they're different when compiled into the core language.

This has some important practical implications, namely that recursive functions 
can't be inlined, but non-recursive can. 

Presumably, 

cyclic = let 
                x = [0,1] ++ y
                y = x
               in x

is another "nonrecursive function".

I don't understand the distinction. I imagine that it is related to the let?in 
clause, but I don't think that I understand that either. Can someone try to 
clarify this ?

dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130918/bf187951/attachment.html>

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

Subject: Digest Footer

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


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

End of Beginners Digest, Vol 63, Issue 23
*****************************************

Reply via email to