Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phoityne in VSCode giving error on readDirContent in IO #33

Open
archywillhe opened this issue Aug 6, 2023 · 2 comments
Open

phoityne in VSCode giving error on readDirContent in IO #33

archywillhe opened this issue Aug 6, 2023 · 2 comments

Comments

@archywillhe
Copy link

readDirContent :: FilePath -> IO Directory

calling it in main gives:

2023-08-06 22:06:43.775394000000 [65335(ThreadId 17)] ERROR APP - [CRITICAL] can not get the initial ghci prompt.
2023-08-06 22:06:51.055900000000 [65360(ThreadId 17)] CRITICAL APP - invalid dap result from ghci. ["\"/Users/arch/ArchGPT2023\"","\"HELLO\""]

Main:


main :: IO ()
main = do
  -- userPath <- getLine
  let userPath = "/Users/arch/ArchGPT2023"
  homeDir <- getHomeDirectory
  let fullPath = if "~" `isPrefixOf` userPath
                then homeDir </> drop 1 userPath
                else userPath
  print fullPath
  print "HELLO"
  dir <- readDirContent userPath
  print "WHY"
  print $ dir
@archywillhe archywillhe changed the title VSCode giving error on readDirContent in IO phoityne in VSCode giving error on readDirContent in IO Aug 6, 2023
@archywillhe
Copy link
Author

archywillhe commented Aug 6, 2023

it shows in the VSCode Debug console:

H>>= :dap-context-modules ...
H>>= :dap-set-function-breakpoints ...
H>>= :dap-continue ...

and then there is nothing...

it's almost like it crashed?

@phoityne
Copy link
Owner

phoityne commented Aug 8, 2023

Hi.

I don't know the readDirContent function.
It might be waiting inputs form stdio inside the readDirContent.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants