Jump to content

Modulos importados no Haskell


conde

Recommended Posts

Isso devia de funcionar. Isso é muito esquesito...

Que versão do GHC é que tens, como instalas-te e qual a mensagem exacta que aparece.

Verifica também se o directório do GHC está na PATH. E executa isto e vê se aparece alguma coisa.

ghc-pkg list network

"Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !"

Sign on a computer system consultant's desk

Link to comment
Share on other sites

conde@localhost:~$ ghc -o Portscan --make Portscan.hs -v

Glasgow Haskell Compiler, Version 6.6.1, for Haskell 98, compiled by GHC version 6.6.1

Using package config file: /usr/lib/ghc-6.6.1/package.conf

wired-in package base mapped to base-2.1.1

wired-in package rts mapped to rts-1.0

wired-in package haskell98 mapped to haskell98-1.0

wired-in package template-haskell mapped to template-haskell-2.1

Hsc static flags: -static

*** Chasing dependencies:

Chasing modules from: Portscan.hs

Portscan.hs:14:7:

    Could not find module `Network':

      locations searched:

        Network.hs

        Network.lhs

*** Deleting temp files:

Deleting:

*** Deleting temp dirs:

Deleting:

conde@localhost:~$ ghc-pkg list network

/usr/lib/ghc-6.6.1/package.conf:

Instalei com "apt-get install ghc"

Link to comment
Share on other sites

Hmm das duas uma. Ou o GHC foi mal instalado, ou então os ficheiros foram removidos.

É que as libs nem estão registadas no sistema de packages do GHC. Verifica se tens a seguinte pasta: "/usr/lib/ghc-6.6.1/import/Network/"

Se sim, ainda tens a possibilidade de tentar registar à mão. Mas isso dá muito trabalho.

Aconselho-te para aproveitar esta ocasião e desinstalar isso e instalares a última versão do GHC (6.8.1)

Tem várias melhorias, para além de ser cerca de 10% a 30% mais rápido do que a versão 6.6.1

http://haskell.org/ghc/download_ghc_681.html

"Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !"

Sign on a computer system consultant's desk

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.