conde Posted November 23, 2007 at 10:55 PM Report Share #149832 Posted November 23, 2007 at 10:55 PM Boas, Fiz um programa Haskell que utiliza os modulos Network e Network.BSD. Quer no Hugs quer no GHC dá-me erro de modulo inexistente. Alguém sabe como adicionar estes modulos na instalação do haskell? Sei que é possível pois nos PC's da faculdade o Hugs não se queixa. Cumps Link to comment Share on other sites More sharing options...
Rui Carlos Posted November 23, 2007 at 11:33 PM Report Share #149840 Posted November 23, 2007 at 11:33 PM Estás a importar correctamente os módulos? É que eu experimentei agora e não tive qualquer problema com isso... Rui Carlos Gonçalves Link to comment Share on other sites More sharing options...
conde Posted November 24, 2007 at 08:57 PM Author Report Share #150039 Posted November 24, 2007 at 08:57 PM module Main (main) where (...) import Network import Network.BSD (...) É deste modo que estou a importar. Link to comment Share on other sites More sharing options...
Betovsky Posted November 24, 2007 at 09:36 PM Report Share #150048 Posted November 24, 2007 at 09:36 PM 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 More sharing options...
conde Posted November 24, 2007 at 09:57 PM Author Report Share #150059 Posted November 24, 2007 at 09:57 PM 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 More sharing options...
Betovsky Posted November 24, 2007 at 10:09 PM Report Share #150064 Posted November 24, 2007 at 10:09 PM 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 More sharing options...
conde Posted November 24, 2007 at 10:48 PM Author Report Share #150082 Posted November 24, 2007 at 10:48 PM Pois... testei em Mac OS e não tive qualquer problema. Parece que o problema é mesmo do package existente nos repositorios do Ubuntu. Lá terei entao que instalar à unha a nova versão. Obrigado pelas dicas. 😛 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now