[Haskell-cafe] Cabal/primes

michael rice nowgate at yahoo.com
Wed Jun 3 15:46:42 EDT 2009


This is working differently than it did last night, when at least import was working.

Michael

[michael at localhost ~]$ ghci
GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> import Data.Numbers.Primes
Could not find module `Data.Numbers.Primes':
  it was found in multiple packages: Numbers-0.2.1 primes-0.1.1
Prelude> :m + Data.Numbers.Primes
Could not find module `Data.Numbers.Primes':
  it was found in multiple packages: Numbers-0.2.1 primes-0.1.1
Prelude> Data.Numbers.Primes> :browse

<interactive>:1:21: parse error on input `:'
Prelude> isPrime 3525266

<interactive>:1:0: Not in scope: `isPrime'
Prelude> 

==========
[michael at localhost ~]$ cd .cabal
[michael at localhost .cabal]$ ls -l
total 20
-rw-rw-r-- 1 michael michael 1729 2009-06-02 18:59 config
drwxrwxr-x 4 michael michael 4096 2009-06-02 22:14 lib
drwxrwxr-x 2 michael michael 4096 2009-06-02 19:05 logs
drwxrwxr-x 3 michael michael 4096 2009-06-02 18:59 packages
drwxrwxr-x 3 michael michael 4096 2009-06-02 19:05 share
[michael at localhost .cabal]$ cd packages
[michael at localhost packages]$ ls -l
total 4
drwxrwxr-x 4 michael michael 4096 2009-06-02 22:14 hackage.haskell.org
[michael at localhost packages]$ cd hackage.haskell.org
[michael at localhost hackage.haskell.org]$ ls -l
total 12464
-rw------- 1 michael michael 11735040 2009-06-02 22:14 00-index.tar
-rw------- 1 michael michael   992994 2009-06-02 22:14 00-index.tar.gz
-rw-rw-r-- 1 michael michael      418 2009-06-02 22:14 build-reports.log
drwxrwxr-x 3 michael michael     4096 2009-06-02 22:14 Numbers
drwxrwxr-x 3 michael michael     4096 2009-06-02 19:05 primes
[michael at localhost hackage.haskell.org]$ 
[michael at localhost hackage.haskell.org]$ pwd
/home/michael/.cabal/packages/hackage.haskell.org
[michael at localhost hackage.haskell.org]$ 


=============



--- On Wed, 6/3/09, brian <briand at aracnet.com> wrote:

From: brian <briand at aracnet.com>
Subject: Re: [Haskell-cafe] Cabal/primes
To: "michael rice" <nowgate at yahoo.com>
Cc: haskell-cafe at haskell.org
Date: Wednesday, June 3, 2009, 10:46 AM

Prelude> :m + Data.Numbers.Primes
Prelude Data.Numbers.Primes> :browse
isPrime :: Integer -> Bool
isProbablyPrime ::
  (System.Random.RandomGen g) => Integer -> g -> (Bool, g)
primes :: [Integer]
Prelude Data.Numbers.Primes> isPrime 3525266
Loading package syb ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
Loading package old-locale-1.0.0.1 ... linking ... done.
Loading package old-time-1.0.0.1 ... linking ... done.
Loading package random-1.0.0.1 ... linking ... done.
Loading package Numbers-0.2.1 ... linking ... done.
False
Prelude Data.Numbers.Primes>

On Jun 3, 2009, at 6:57 AM, michael rice wrote:

> OK, I downloaded Numbers. Still missing the three functions I wanted, which are primes, isPrime, and isProbablyPrime. How do I get these?
> 
> Michael
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090603/54208f89/attachment.html


More information about the Haskell-Cafe mailing list