Re: cabal install network was: Re: ANNOUNCE: GHC 7.0.2 Release Candidate 2

2011-02-22 Thread Christian Maeder
Am 21.02.2011 19:16, schrieb Ian Lynagh:
 On Mon, Feb 21, 2011 at 05:44:54PM +0100, Christian Maeder wrote:

 % cabal --version
 cabal-install version 0.9.5
 using version 1.10.1.0 of the Cabal library 

 With this the cabal-install command, you can install the network package.

 No, I've tried with:

 cabal-install version 0.9.6
 using version 1.10.0.0 of the Cabal library
 
 You need 1.10.1.0 (the version that comes with RC 2).

Ah, yes this one works, although with:

  checking whether AI_NUMERICSERV is declared... no

even if hsc2hs does not contain this isysroot stuff. Where does cabal
get its flags from? (hardcoded?)

@Johan: I don't think it is a problem of network library

Cheers Christian


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: cabal install network was: Re: ANNOUNCE: GHC 7.0.2 Release Candidate 2

2011-02-22 Thread Ian Lynagh
On Tue, Feb 22, 2011 at 09:59:20AM +0100, Christian Maeder wrote:
 
 Where does cabal get its flags from? (hardcoded?)

From the C compiler flags, Gcc Linker flags and Ld Linker flags
entries in ghc --info's output.


Thanks
Ian


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Question about Haskell AST

2011-02-22 Thread Ian Lynagh

Hi Jane,

On Mon, Feb 21, 2011 at 11:46:16PM -0800, Jane Ren wrote:
 
 Did you mean I have to include the dflags like below to get the parsetree of 
 a base library file like libraries/base/GHC/List.lhs
  
 I am stilling getting the same error 
 AstWalker: panic! (the 'impossible' happened)
   (GHC version 7.0.1 for x86_64-apple-darwin):
   lexical error at character 'i'
 
 my code is...
 setSessionDynFlags ...
 target - guessTarget targetFile Nothing
   setTargets [target]
 load LoadAllTargets
 
 Would you have any other suggestions?

This works for me with the 7.0 branch:

main :: IO ()
main =
defaultErrorHandler defaultDynFlags $ do
  runGhc (Just libdir) $ do
dflags - getSessionDynFlags
let dflags' = foldl xopt_set dflags 
[Opt_Cpp, Opt_ImplicitPrelude, Opt_MagicHash]
setSessionDynFlags dflags'
target - guessTarget fp Nothing
setTargets [target]
load LoadAllTargets
liftIO $ putStrLn Done

Let me know if you still have problems.


Thanks
Ian


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: Question about Haskell AST

2011-02-22 Thread Simon Peyton-Jones
I think the missing piece was Opt_Cpp.  Data.List uses the C preprocessor

S

| -Original Message-
| From: cvs-ghc-boun...@haskell.org [mailto:cvs-ghc-boun...@haskell.org] On
| Behalf Of Ian Lynagh
| Sent: 22 February 2011 15:09
| To: Jane Ren
| Cc: cvs-...@haskell.org; glasgow-haskell-users@haskell.org
| Subject: Re: Question about Haskell AST
| 
| 
| Hi Jane,
| 
| On Mon, Feb 21, 2011 at 11:46:16PM -0800, Jane Ren wrote:
| 
|  Did you mean I have to include the dflags like below to get the parsetree
| of a base library file like libraries/base/GHC/List.lhs
| 
|  I am stilling getting the same error
|  AstWalker: panic! (the 'impossible' happened)
|(GHC version 7.0.1 for x86_64-apple-darwin):
|  lexical error at character 'i'
| 
|  my code is  ...
|  setSessionDynFlags ...
|  target - guessTarget targetFile Nothing
|  setTargets [target]
|  load LoadAllTargets
| 
|  Would you have any other suggestions?
| 
| This works for me with the 7.0 branch:
| 
| main :: IO ()
| main =
| defaultErrorHandler defaultDynFlags $ do
|   runGhc (Just libdir) $ do
| dflags - getSessionDynFlags
| let dflags' = foldl xopt_set dflags
| [Opt_Cpp, Opt_ImplicitPrelude, Opt_MagicHash]
| setSessionDynFlags dflags'
| target - guessTarget fp Nothing
| setTargets [target]
| load LoadAllTargets
| liftIO $ putStrLn Done
| 
| Let me know if you still have problems.
| 
| 
| Thanks
| Ian
| 
| 
| ___
| Cvs-ghc mailing list
| cvs-...@haskell.org
| http://www.haskell.org/mailman/listinfo/cvs-ghc


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: cabal install network was: Re: ANNOUNCE: GHC 7.0.2 Release Candidate 2

2011-02-22 Thread Christian Maeder
Am 22.02.2011 14:47, schrieb Ian Lynagh:
 On Tue, Feb 22, 2011 at 09:59:20AM +0100, Christian Maeder wrote:

 Where does cabal get its flags from? (hardcoded?)
 
 From the C compiler flags, Gcc Linker flags and Ld Linker flags
 entries in ghc --info's output.

Ok, they are not in bin/ghc script. So where does ghc get them from?

Thanks Christian

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: ANNOUNCE: GHC 7.0.2 Release Candidate 1

2011-02-22 Thread paolino

Hi, I've a problem compiling last network package 2.3.0.2
[ 4 of 10] Compiling Network.Socket   ( dist/build/Network/Socket.hs,
dist/build/Network/Socket.o )

Network/Socket.hsc:1701:11:
Ambiguous occurrence `closeFdWith'
It could refer to either `Network.Socket.closeFdWith',
 defined at Network/Socket.hsc:1046:1
  or `GHC.Conc.closeFdWith',
 imported from GHC.Conc at
Network/Socket.hsc:204:26-36

Not sure it's related to 7.0.2, but I didn't have problems with 7.0.1

paolino
-- 
View this message in context: 
http://haskell.1045720.n5.nabble.com/ANNOUNCE-GHC-7-0-2-Release-Candidate-1-tp3308358p3395738.html
Sent from the Haskell - Glasgow-haskell-users mailing list archive at 
Nabble.com.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: ANNOUNCE: GHC 7.0.2 Release Candidate 1

2011-02-22 Thread paolino

Newest version I was able to compile is 2.3, 2.3.0.1 is failing with same
error

paolino@paolino-ssd32:~/reactivegas$ uname -a
Linux paolino-ssd32 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC
2011 x86_64 GNU/Linux

best

paolino
-- 
View this message in context: 
http://haskell.1045720.n5.nabble.com/ANNOUNCE-GHC-7-0-2-Release-Candidate-1-tp3308358p3395759.html
Sent from the Haskell - Glasgow-haskell-users mailing list archive at 
Nabble.com.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


ghc-pkg regression (or deliberate change)?

2011-02-22 Thread Tyler Pirtle
Hi there,

I'm using a system with an older version of GHC (6.8.3), and invoking
ghc-pkg against a non-existing file in -f:

$ haskell/ghc/v683/k8/lib/ghc-6.8.3/ghc-pkg.bin --global-conf
haskell/ghc/v683/k8/lib/ghc-6.8.3/package.conf -f
/tmp/nonexistent.Foo.package.conf register /tmp/Foo.package_spec

ghc-pkg happily creates the file referenced with -f and fills it with
these contents:


[InstalledPackageInfo {package = PackageIdentifier {pkgName =
hsS-SFoo, pkgVersion = Version {versionBranch = [1,0], versionTags =
[]}}, license = AllRightsReserved, copyright = , maintainer = ,
author = , stability = , homepage = , pkgUrl = , description =
, category = , exposed = False, exposedModules = [], hiddenModules
= [], importDirs = [], libraryDirs = [], hsLibraries = [],
extraLibraries = [], extraGHCiLibraries = [], includeDirs = [],
includes = [], depends = [], hugsOptions = [], ccOptions = [],
ldOptions = [], frameworkDirs = [], frameworks = [], haddockInterfaces
= [], haddockHTMLs = []}
]


GHC 7.0.1 it appears does not do the same thing:

$ haskell/ghc/v701/k8/lib/ghc-7.0.1/ghc-pkg --global-conf
haskell/ghc/v701/k8/lib/ghc-7.0.1/package.conf.d -f
/tmp/nonexistent.Foo.package_conf --force register
/tmp/Foo.package_spec
ghc-pkg: .../bin/hs/Foo.package_conf: openFile: does not exist (No
such file or directory)

(paths have been mangled by hand).

ghc-pkg in 6.8.3 does what it does even without using --force. What am
i missing in 7.0.1? Is this a bug or is this intentional?

Thanks,


Tyler

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: cabal install network was: Re: ANNOUNCE: GHC 7.0.2 Release Candidate 2

2011-02-22 Thread 山本和彦
 Ah, yes this one works, although with:
 
   checking whether AI_NUMERICSERV is declared... no
 
 even if hsc2hs does not contain this isysroot stuff. Where does cabal
 get its flags from? (hardcoded?)

Ah, this also happened to me.

checking whether AI_ADDRCONFIG is declared... yes
checking whether AI_ALL is declared... yes
checking whether AI_NUMERICSERV is declared... no
checking whether AI_V4MAPPED is declared... yes

I'm using Mac 64bit version of GHC 7.0.2 rc1 on Snow Leopard.

--Kazu

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users