{- |
Module      :  $Header$
Description :  The entrypoint of the application.
Author      :  Nils 'bash0r' Jonsson
Copyright   :  (c) 2015 Nils 'bash0r' Jonsson
License     :  MIT

Maintainer  :  aka.bash0r@gmail.com
Stability   :  unstable
Portability :  non-portable (Portability is untested.)

The entrypoint of the application.
-}
module Main
( main
) where

import Control.Applicative
import Control.Monad

import System.Environment

import qualified Headergen.Commands.Creation       as Creation
import qualified Headergen.Commands.Help           as Help
import qualified Headergen.Commands.Initialization as Initialization


main :: IO ()
main = do
  args <- getArgs
  handleParameters args
  where
    handleParameters ("init"  :xs) = Initialization.command xs
    handleParameters ("create":xs) = Creation.command       xs
    handleParameters ("help"  :xs) = Help.command           xs
    handleParameters _             = Help.command           []

