Re: [Haskell-cafe] Not to load Prelude
On Thu, 10 Jan 2008, [windows-1252] Maurício wrote: > Hi, > > Is it possible not to load Prelude module > when compiling a Haskell module? Or instruct > ghc to “unload” it? You can either import Prelude () but some things like 'fromInteger' as used for number literals are still present. You can write the pragma {-# OPTIONS -fno-implicit-prelude #-} at the top of your module to get completely rid of the Prelude. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Not to load Prelude
At Thu, 10 Jan 2008 17:22:02 -0200, Maurício wrote: > > Hi, > > Is it possible not to load Prelude module > when compiling a Haskell module? Or instruct > ghc to “unload” it? You can either do: import Prelude() or compile with the -fno-implicit-prelude flag, or add {-# LANGUAGE NoImplicitPrelude #-} to the top of the module. NoImplicitPrelude is more aggressive than 'import Prelude()'. You will have to look elsewhere for a better explanation of the difference. j. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Not to load Prelude
Use: import Prelude () On Jan 10, 2008 11:22 AM, Maurício <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible not to load Prelude module > when compiling a Haskell module? Or instruct > ghc to "unload" it? > > Thanks, > Maurício > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Not to load Prelude
Sorry for the double message, Mauricio. It's the first time I ever posted to haskell-cafe - figures I'd click on "reply" and not "reply to all"... On Jan 10, 2008 9:22 PM, Maurício <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible not to load Prelude module > when compiling a Haskell module? Or instruct > ghc to "unload" it? > > Thanks, > Maurício > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -XNoImplicitPrelude.does this in 6.8.x. In earlier versions (and apparently in 6.8 too), it's -fno-implicit-prelude. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Not to load Prelude
On Jan 10, 2008, at 14:22 , Maurí cio wrote: Is it possible not to load Prelude module when compiling a Haskell module? Or instruct ghc to “unload” it? -fno-implicit-prelude -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon universityKF8NH ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe