{-# LANGUAGE OverloadedStrings #-} import System.Environment (getArgs) import System.Exit (exitFailure) import Control.Monad (when) import MDict (lookupInCollection) main :: IO () main = do args <- getArgs when (length args < 2) $ do putStrLn "Usage: Main " exitFailure let dictDir = args !! 0 queryKey = args !! 1 -- Process all files lookupInCollection dictDir queryKey