Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cleanup
  • Loading branch information
kfish committed Aug 6, 2009
1 parent 7e575ef commit f25ba3d
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions UI/Command/Command.hs
@@ -1,14 +1,14 @@
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
module UI.Command.Command (
Command (..),
defCmd
) where

import Data.Default

import Control.Monad.Reader (ReaderT)
import Control.Monad.Trans (liftIO)

import UI.Command.App (AppContext(..))
import UI.Command.App (App)

------------------------------------------------------------
-- Command class
Expand All @@ -32,8 +32,7 @@ data (Default config) => Command config = Command {
cmdName :: String,

-- | Handler
-- cmdHandler :: App config (),
cmdHandler :: ReaderT (AppContext config) IO (),
cmdHandler :: App config (),

-- | Category in this program's documentation
cmdCategory :: String,
Expand All @@ -48,12 +47,11 @@ data (Default config) => Command config = Command {
cmdExamples :: [(String, String)]
}

instance (Default config) => Default (App config ()) where
def = liftIO $ putStrLn "Unimplemented command"

instance (Default config) => Default (Command config) where
def = Command "<Anonymous command>"
(liftIO $ putStrLn "Unimplemented command")
def def def def
def = Command "<Anonymous command>" def def def def def

defCmd :: Command ()
defCmd = Command "<Anonymous command>"
(liftIO $ putStrLn "Unimplmented command")
"" "" "" []
defCmd = Command "<Anonymous command>" def def def def def

0 comments on commit f25ba3d

Please sign in to comment.