[Haskell-cafe] import

2008-12-02 Thread Galchin, Vasili
Hello, I am a little uncertain about "import" semantics in a hierarchical package ... i.e. if I import the root of a package root do I get everything under the "root's" namespace, i.e. the namespace tree? thanks, vasili ___ Haskell-Cafe mailing lis

[Haskell-cafe] import IO

2012-05-16 Thread A Smith
Hi folks I need a little help. I had a hiccup upgrading my Ubuntu system, and eventually did a fresh install. Its mostly fixed to my old favourite ways but I cannot remember what's needed to install the stuff that the "import IO" statement uses! -- Andrew ___

Re: [Haskell-cafe] import

2008-12-02 Thread Galchin, Vasili
specifically I am concerned about ByteString and underlying nodes .. ??? On Tue, Dec 2, 2008 at 3:45 AM, Bulat Ziganshin <[EMAIL PROTECTED]>wrote: > Hello Vasili, > > Tuesday, December 2, 2008, 11:48:40 AM, you wrote: > > I am a little uncertain about "import" semantics in a > > hierarchic

Re: [Haskell-cafe] import

2008-12-02 Thread Luke Palmer
2008/12/2 Galchin, Vasili <[EMAIL PROTECTED]>: > Hello, > > I am a little uncertain about "import" semantics in a hierarchical > package ... i.e. if I import the root of a package root do I get everything > under the "root's" namespace, i.e. the namespace tree? There is nothing at all magical

Re: [Haskell-cafe] import

2008-12-02 Thread Bulat Ziganshin
Hello Vasili, Tuesday, December 2, 2008, 11:48:40 AM, you wrote: > I am a little uncertain about "import" semantics in a > hierarchical package ... i.e. if I import the root of a package root > do I get everything under the "root's" namespace, i.e. the namespace tree? no. you import just *mo

[Haskell-cafe] import qualified?

2009-05-22 Thread Vasili I. Galchin
Hello, I am working with some somewhat legacy code. I understand what "import qualified Blah as B" means but what does "import qualified Blah" mean? Is this a deprecated feature? I saw with user defined module as well as with "import qualified System" for example. REgards, Vasili __

Re: [Haskell-cafe] import IO

2012-05-16 Thread Brandon Allbery
On Wed, May 16, 2012 at 3:32 PM, A Smith wrote: > Hi folks > I need a little help. > I had a hiccup upgrading my Ubuntu system, and eventually did a fresh > install. > Its mostly fixed to my old favourite ways but I cannot remember what's > needed to install the stuff that the "import IO" stateme

Re[2]: [Haskell-cafe] import

2008-12-02 Thread Bulat Ziganshin
Hello Vasili, Tuesday, December 2, 2008, 2:08:03 PM, you wrote: it's just convention to make modules like this: module System.Stream ( module System.Stream.Class, module System.Stream.Transformer, module System.Stream.Instance, module System.Stream.Utils, ) where import System

Re: [Haskell-cafe] import qualified?

2009-05-22 Thread wren ng thornton
Vasili I. Galchin wrote: Hello, I am working with some somewhat legacy code. I understand what "import qualified Blah as B" means but what does "import qualified Blah" mean? Is this a deprecated feature? I saw with user defined module as well as with "import qualified System" for example.

Re: [Haskell-cafe] import qualified?

2009-05-22 Thread Paulo Tanimoto
On Sat, May 23, 2009 at 12:39 AM, Vasili I. Galchin wrote: > Hello, > > I am working with some somewhat legacy code. I understand what "import > qualified Blah as B" means but what does "import qualified Blah" mean? Is > this a deprecated feature? I saw with user defined module as well as wit

Re: [Haskell-cafe] import qualified?

2009-05-22 Thread Vasili I. Galchin
Hi Paulo, You are teasing me ;^) So what is the "semantics" of "import qualified Blah"? Regards, Vasili On Sat, May 23, 2009 at 12:47 AM, Paulo Tanimoto wrote: > On Sat, May 23, 2009 at 12:39 AM, Vasili I. Galchin > wrote: > > Hello, > > > > I am working with some somewhat legacy cod

Re: [Haskell-cafe] import qualified?

2009-05-23 Thread Daniel Fischer
Am Samstag 23 Mai 2009 08:08:42 schrieb Vasili I. Galchin: > Hi Paulo, > >     You are teasing me ;^) So what is the "semantics" of "import qualified > Blah"? > > Regards, > > Vasili The qualified names (Blah.foo, Blah.baz) are in scope, but not the unqualified names foo, baz. If you import qu

[Haskell-cafe] Import proposal from Haskell'?

2010-11-04 Thread John Smith
Type-directed name resolution was proposed by SPJ for Haskell', but not for GHC. Is there any particular process for importing tickets from Haskell' to GHC? http://hackage.haskell.org/trac/haskell-prime/ticket/129 ___ Haskell-Cafe mailing list Haskell

[Haskell-cafe] "import" functionality in DSLs

2011-04-16 Thread Nikhil A. Patil
Hi, I am planning a simple monadic DSL (frankly, calling it a DSL is a bit of a stretch; it's just a somewhat glorified state monad), and I wish to implement some kind of "import" functionality for it. The DSL code looks something like this: > doit :: DSL Term > doit = do (+) <- define_function

Re: [Haskell-cafe] "import" functionality in DSLs

2011-04-16 Thread Felipe Almeida Lessa
On Sat, Apr 16, 2011 at 10:29 AM, Nikhil A. Patil wrote: >> doit :: DSL Term >> doit = do (+) <- (+) >>           n0  <- n0 >>           k   <- k >>           -- begin beautiful DSL code >>           let x = k + n0 >>           return $ x + x I guess the core problem is that on each time you say

Re: [Haskell-cafe] "import" functionality in DSLs

2011-04-16 Thread Nikhil A. Patil
On Sat, Apr 16, 2011 at 08:55 CDT, Felipe Almeida Lessa wrote: > On Sat, Apr 16, 2011 at 10:29 AM, Nikhil A. Patil > wrote: > >> doit :: DSL Term > >> doit = do (+) <- (+) > >>           n0  <- n0 > >>           k   <- k > >>           -- begin beautiful DSL code > >>           let x = k + n0 > >>

Re: [Haskell-cafe] "import" functionality in DSLs

2011-04-16 Thread Luke Palmer
You can get away with this using {-# LANGUAGE RecordWildCards #-}, if you put your prelude into a record. Here's a test I did to make sure the technique worked: {-# LANGUAGE RecordWildCards #-} import Prelude hiding ((+)) data Foo = Foo { (+) :: Int -> Int -> Int, n0 :: Int } prelude

Re: [Haskell-cafe] "import" functionality in DSLs

2011-04-16 Thread Nikhil A. Patil
On Sat, Apr 16, 2011 at 13:49 CDT, Luke Palmer wrote: > You can get away with this using {-# LANGUAGE RecordWildCards #-}, if you > put your prelude into a record. Here's a test I did to make sure the > technique worked: > > {-# LANGUAGE RecordWildCards #-} > > import Prelude hiding ((+)) > > d

Re: [Haskell-cafe] "import" functionality in DSLs

2011-04-17 Thread wren ng thornton
On 4/16/11 9:55 AM, Felipe Almeida Lessa wrote: On Sat, Apr 16, 2011 at 10:29 AM, Nikhil A. Patil wrote: doit :: DSL Term doit = do (+)<- (+) n0<- n0 k<- k -- begin beautiful DSL code let x = k + n0 return $ x + x I guess the core proble

[Haskell-cafe] Import qualified, inverse of hiding

2008-09-15 Thread Mauricio
Hi, 'import' allows one to say 'hiding' to a list of names. Is it possible to do the opposite, i.e., list the names I want to import? Something like "import Module showing x"? Thanks, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org htt

Re: [Haskell-cafe] Import qualified, inverse of hiding

2008-09-15 Thread Paulo Tanimoto
You mean like this? import Data.List (foldl', nub) Or am I misunderstanding your question? Paulo On Mon, Sep 15, 2008 at 2:26 PM, Mauricio <[EMAIL PROTECTED]> wrote: > Hi, > > 'import' allows one to say 'hiding' to > a list of names. Is it possible to do the > opposite, i.e., list the names I w

Re: [Haskell-cafe] Import qualified, inverse of hiding

2008-09-15 Thread Ryan Ingram
Yes, just leave out the keyword "hiding". > import Data.Map (Map, insert, lookup) This is the "safest" way to do imports as you're guaranteed that changes to the export list that do not affect those qualifiers won't cause code to stop compiling or become ambiguous. -- ryan On Mon, Sep 15, 200