Hari Krishna
Hari Krishna

Reputation: 3568

Haskell: Not in scope: ‘listDirectory’

I am using GHC version 7.10.2. When i try to use listDirectory function, I am getting following error.

Prelude System.Directory> :t listDirectory

<interactive>:1:1: Not in scope: ‘listDirectory’

I am also updated my packages using 'cabal update'.

Reference https://hackage.haskell.org/package/directory-1.2.5.1/docs/System-Directory.html

Upvotes: 4

Views: 737

Answers (1)

Chad Gilbert
Chad Gilbert

Reputation: 36385

listDirectory wasn't added until version 1.2.5.0 last December. Take a look at your version of the directory package by running ghc-pkg list, or if you are using Stack, run stack exec ghc-pkg list.

Upvotes: 6

Related Questions