module Main where import Control.Monad (when) import Gui (runEditor) import System.Environment (getArgs) main = do args <- getArgs when (null args) $ error (msgWithUsage "Please specify a file") runEditor $ head args msgWithUsage :: String -> String msgWithUsage = \x -> x ++ "\n" ++ usage usage :: String usage = "Usage: hedit "