Skip to content

phoityne in VSCode giving error on readDirContent in IO #33

@archywillhe

Description

@archywillhe
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions