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: Make synonym for Main? (Christopher Howard)
----------------------------------------------------------------------
Message: 1
Date: Fri, 17 Jun 2011 23:56:24 -0800
From: Christopher Howard <[email protected]>
Subject: Re: [Haskell-beginners] Make synonym for Main?
To: Haskell Beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
On 06/17/2011 11:43 PM, Michael Xavier wrote:
> http://www.haskell.org/haskellwiki/Import
>
> You would do:
> import qualified Main as M
>
> On Fri, Jun 17, 2011 at 10:47 PM, Christopher Howard
> <[email protected]
> <mailto:[email protected]>> wrote:
>
> Say you have a function in Main that is the same name as a function
> you've imported, but you don't want to rename it. But then you have to
> prefix it with "Main" each time you use it:
>
> Main.functionName
>
> Is there some way to rename Main or make a synonym for it, kind of like
> the "import qualified" trick, so you could do...
>
> M.functionName
>
> --
> frigidcode.com <http://frigidcode.com>
> theologia.indicium.us <http://theologia.indicium.us>
>
> _______________________________________________
> Beginners mailing list
> [email protected] <mailto:[email protected]>
> http://www.haskell.org/mailman/listinfo/beginners
>
>
>
>
> --
> Michael Xavier
> http://www.michaelxavier.net
Thank you, however, I get the following error message:
Module imports form a cycle for modules:
Main (add_books.hs)
imports: Main
I'm running GHC 7.0.4
To be clear, I want Main qualified within the code that is Main.
--
frigidcode.com
theologia.indicium.us
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 36, Issue 47
*****************************************