Afonso2424 Posted September 25, 2023 at 09:47 PM Report #631851 Posted September 25, 2023 at 09:47 PM (edited) 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 September 25, 2023 at 09:52 PM by Afonso2424
Rui Carlos Posted September 26, 2023 at 07:32 PM Report #631853 Posted September 26, 2023 at 07:32 PM Já há muitos anos que não uso o GHCi, mas tenho ideia que aparece o nome do módulo. Qual é o conteúdo do ficheiro Q50.hs? Rui Carlos Gonçalves
Afonso2424 Posted September 26, 2023 at 07:53 PM Author Report #631854 Posted September 26, 2023 at 07:53 PM São exercícios do tipo, "faz uma função que constrói uma lista dos números inteiros compreendidos entre dois limites e espaçados de um valor constante."
pdfrod Posted September 26, 2023 at 08:45 PM Report #631855 Posted September 26, 2023 at 08:45 PM 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?
Solution Afonso2424 Posted September 27, 2023 at 12:31 AM Author Solution Report #631856 Posted September 27, 2023 at 12:31 AM Cheguei e estava a dar erro mas hoje voltei a testar e já funcionou. Não sei o que se passou mas deve ter sido algo a haver com a localização do ficheiro ou assim... Obrigado pela ajuda!!!
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