I'm learning purescript and trying to log a directory content.
module Main where
import Prelude
import Data.Traversable (traverse)
import Effect (Effect)
import Effect.Console (log)
import Node.FS.Sync (readdir)
fnames = readdir "."
main = do
travere (\a -> log $ show a) fnames
I want to get folder entries printed in console output.
I can not get rid of (or pass through) the Effect which I get from Node.FS.Sync (readdir) (I get Effect (Array String)). And traverse or log or show can not work with Effect in front of Array String.
I get No type class instance was found for Data.Traversable.Traversable Effect.