1 {-# LANGUAGE OverloadedStrings #-}
5 import Prelude hiding (readFile)
6 import Data.ByteString.Lazy (ByteString)
7 import Data.ByteString.Lazy.Char8 (readFile)
9 import Control.Exception
13 queryOp :: String -> IO (Either String ByteString)
14 queryOp key = catch (readFile key >>= return . Right)
15 (\e -> return (Left (show (e :: IOException))))
18 d <- descendNmcDom queryOp [] $ seedNmcDom "root"