main :: IO ()
main = withManager $ \man -> do
  [dic] <- getArgs
  dic0 <- parseDic dic
  tvar <- newTVarIO dic0
  _ <- watchDir man (fromString $ takeDirectory dic)
    ((== fromString dic) . eventPath) $ const $ do
    atomically . writeTVar tvar =<< parseDic dic
  runSkkserv SkkservSettings { port = 1728, dicPath = dic } $ \a -> do
    dicB <- externalB $ readTVarIO tvar
    skkserv dicB a
main :: IO ()
main = withManager $ \man -> do
  [dic] <- getArgs
  dic0 <- parseDic dic
  tvar <- newTVarIO dic0
  _ <- watchDir man (fromString $ takeDirectory dic)
    ((== fromString dic) . eventPath) $ const $ do
    atomically . writeTVar tvar =<< parseDic dic
  runSkkserv SkkservSettings { port = 1728, dicPath = dic } $ \a -> do
    dicB <- externalB $ readTVarIO tvar
    skkserv dicB a
main = withManager $ \man -> do
  [dic] <- getArgs
  dic0 <- parseDic dic
  tvar <- newTVarIO dic0
  _ <- watchDir man (fromString $ takeDirectory dic)
    ((== fromString dic) . eventPath) $ const $ do
    atomically . writeTVar tvar =<< parseDic dic
  runSkkserv SkkservSettings { port = 1728, dicPath = dic } $ \a -> do
    dicB <- externalB $ readTVarIO tvar
    skkserv dicB a