Jump to content

GHCi


Afonso2424
Go to solution Solved by Afonso2424,

Recommended Posts

Boas malta,

Estou com um problema no ghci (penso eu), usando o vscode. No fim de interpretar o programa é suposto, no terminal aparecer "Main>"  certo? 
É que no meu terminal volta a aparecer "ghci>" ou seja, não consigo testar as funções.

obrigado

D:\Universidade\23-24\PF>ghci Q50.hs
GHCi, version 9.0.1: https://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Q50              ( Q50.hs, interpreted )
Ok, one module loaded.
ghci>

Edited by Afonso2424
Link to comment
Share on other sites

A mim também aparece ">ghci" mas funciona tudo bem - se usar uma constante definida no ficheiro, funciona bem.

$ echo 'hello = "world"' > Q50.hs
$ stack ghci Q50.hs

Configuring GHCi with the following packages: 
GHCi, version 9.0.2: https://www.haskell.org/ghc/  :? for help

[1 of 1] Compiling Main             ( Q50.hs, interpreted )
Ok, one module loaded.
Loaded GHCi configuration from /tmp/haskell-stack-ghci/2eb86dc4/ghci-script
ghci> hello
"world"

Experimentaste invocar alguma função definida no ficheiro Q50.hs?

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.