
Hi, surprisingly i can't seem to google an answer to this: Could not find module `Complex' It is a member of the hidden package `haskell98-2.0.0.2'. Use -v to see a list of the files searched for. it's been quite a while since I've used ghci, and I'm just about positive I've solved this problem before, but can't seem to figure it out. Thanks for any help.

On Sun, Sep 28, 2014 at 12:55:53PM -0700, briand@aracnet.com wrote:
surprisingly i can't seem to google an answer to this:
Could not find module `Complex' It is a member of the hidden package `haskell98-2.0.0.2'. Use -v to see a list of the files searched for.
I believe `Complex` was renamed `Data.Complex`.

On Sun, 28 Sep 2014 20:58:42 +0100
Tom Ellis
On Sun, Sep 28, 2014 at 12:55:53PM -0700, briand@aracnet.com wrote:
surprisingly i can't seem to google an answer to this:
Could not find module `Complex' It is a member of the hidden package `haskell98-2.0.0.2'. Use -v to see a list of the files searched for.
I believe `Complex` was renamed `Data.Complex`. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
aha. i thought it was something like that. But there's a bit of a weirdness. Prelude> import Data.Complex Prelude Data.Complex> :browse data Complex a = !a :+ !a cis :: RealFloat a => a -> Complex a conjugate :: RealFloat a => Complex a -> Complex a imagPart :: RealFloat a => Complex a -> a magnitude :: RealFloat a => Complex a -> a mkPolar :: RealFloat a => a -> a -> Complex a phase :: RealFloat a => Complex a -> a polar :: RealFloat a => Complex a -> (a, a) realPart :: RealFloat a => Complex a -> a Prelude Data.Complex> So that works, but import Data.Complex in my code does _not_ work. btw. ghc 7.6.1. Thanks, Brian

On Sun, Sep 28, 2014 at 01:38:55PM -0700, briand@aracnet.com wrote:
On Sun, 28 Sep 2014 20:58:42 +0100 Tom Ellis
wrote: On Sun, Sep 28, 2014 at 12:55:53PM -0700, briand@aracnet.com wrote:
surprisingly i can't seem to google an answer to this:
Could not find module `Complex' It is a member of the hidden package `haskell98-2.0.0.2'. Use -v to see a list of the files searched for.
I believe `Complex` was renamed `Data.Complex`.
aha. i thought it was something like that.
But there's a bit of a weirdness.
Prelude> import Data.Complex Prelude Data.Complex> :browse data Complex a = !a :+ !a cis :: RealFloat a => a -> Complex a conjugate :: RealFloat a => Complex a -> Complex a imagPart :: RealFloat a => Complex a -> a magnitude :: RealFloat a => Complex a -> a mkPolar :: RealFloat a => a -> a -> Complex a phase :: RealFloat a => Complex a -> a polar :: RealFloat a => Complex a -> (a, a) realPart :: RealFloat a => Complex a -> a Prelude Data.Complex>
So that works, but
import Data.Complex
in my code does _not_ work.
btw. ghc 7.6.1.
So what's the error message?

On Sun, 28 Sep 2014 21:46:22 +0100
Tom Ellis
On Sun, Sep 28, 2014 at 01:38:55PM -0700, briand@aracnet.com wrote:
On Sun, 28 Sep 2014 20:58:42 +0100 Tom Ellis
wrote: On Sun, Sep 28, 2014 at 12:55:53PM -0700, briand@aracnet.com wrote:
surprisingly i can't seem to google an answer to this:
Could not find module `Complex' It is a member of the hidden package `haskell98-2.0.0.2'. Use -v to see a list of the files searched for.
So what's the error message?
yes. well it pays to read carefully. once i fixed it in the top level module another module also be called had the wrong import, i didn't notice that at first, thought i had the same error. well i did, but in a different file. all fixed and i'm good to go. thanks for your help ! p.s. is there documentation that makes it clear that Data.Complex is required ? I'm looking at the haskell hierarchial libraries and it's not at all obvious that Complex comes under Data. Here's the link I'm using: http://www.haskell.org/ghc/docs/latest/html/libraries/ Brian

On Sun, Sep 28, 2014 at 01:56:48PM -0700, briand@aracnet.com wrote:
On Sun, 28 Sep 2014 21:46:22 +0100 Tom Ellis
wrote: On Sun, Sep 28, 2014 at 01:38:55PM -0700, briand@aracnet.com wrote:
On Sun, 28 Sep 2014 20:58:42 +0100 Tom Ellis
wrote: On Sun, Sep 28, 2014 at 12:55:53PM -0700, briand@aracnet.com wrote:
surprisingly i can't seem to google an answer to this:
Could not find module `Complex' It is a member of the hidden package `haskell98-2.0.0.2'. Use -v to see a list of the files searched for.
So what's the error message?
yes. well it pays to read carefully.
once i fixed it in the top level module another module also be called had the wrong import, i didn't notice that at first, thought i had the same error. well i did, but in a different file.
all fixed and i'm good to go.
thanks for your help !
p.s. is there documentation that makes it clear that Data.Complex is required ?
I'm looking at the haskell hierarchial libraries and it's not at all obvious that Complex comes under Data. Here's the link I'm using:
Glad you got it sorted! Complex is mentioned there because it is still around for compatibility with Haskell 98, but it's not enabled by default. You'll also see Data.Complex in that list. Arguably there should be a warning on the page of the former to use the latter instead. Tom

On Sun, 28 Sep 2014 21:59:40 +0100
Tom Ellis
Complex is mentioned there because it is still around for compatibility with Haskell 98, but it's not enabled by default. You'll also see Data.Complex in that list. Arguably there should be a warning on the page of the former to use the latter instead.
aha. i see that now. ok. at least now i know how to fix this. this is fairly old code, and i'm getting a lot of these sorts of things. slowly but surely working through them :-) thanks again. Brian

On Sun, Sep 28, 2014 at 02:08:30PM -0700, briand@aracnet.com wrote:
On Sun, 28 Sep 2014 21:59:40 +0100 Tom Ellis
wrote: Complex is mentioned there because it is still around for compatibility with Haskell 98, but it's not enabled by default. You'll also see Data.Complex in that list. Arguably there should be a warning on the page of the former to use the latter instead.
aha. i see that now.
ok. at least now i know how to fix this.
this is fairly old code, and i'm getting a lot of these sorts of things.
slowly but surely working through them :-)
Depending on exactly what you are doing, you may just want to enable Haskell 98 compatibility instead. Tom

On Sun, 28 Sep 2014 22:11:45 +0100
Tom Ellis
On Sun, Sep 28, 2014 at 02:08:30PM -0700, briand@aracnet.com wrote:
On Sun, 28 Sep 2014 21:59:40 +0100 Tom Ellis
wrote: Complex is mentioned there because it is still around for compatibility with Haskell 98, but it's not enabled by default. You'll also see Data.Complex in that list. Arguably there should be a warning on the page of the former to use the latter instead.
aha. i see that now.
ok. at least now i know how to fix this.
this is fairly old code, and i'm getting a lot of these sorts of things.
slowly but surely working through them :-)
Depending on exactly what you are doing, you may just want to enable Haskell 98 compatibility instead.
nah. it's fine. just a bit of Data.This and System.That. all fixed. didn't take long at all. the code wasn't _that_ old :-) Brian
participants (2)
-
briand@aracnet.com
-
Tom Ellis