module Idris.Help (CmdArg(..), extraHelp) where
data CmdArg = ExprArg 
            | NameArg 
            | FileArg 
            | ModuleArg 
            | PkgArgs 
            | NumberArg 
            | NamespaceArg 
            | OptionArg 
            | MetaVarArg 
            | ColourArg  
            | NoArg 
            | SpecialHeaderArg 
            | ConsoleWidthArg 
            | DeclArg 
            | ManyArgs CmdArg 
            | OptionalArg CmdArg 
            | SeqArgs CmdArg CmdArg 
instance Show CmdArg where
    show ExprArg          = "<expr>"
    show NameArg          = "<name>"
    show FileArg          = "<filename>"
    show ModuleArg        = "<module>"
    show PkgArgs          = "<package list>"
    show NumberArg        = "<number>"
    show NamespaceArg     = "<namespace>"
    show OptionArg        = "<option>"
    show MetaVarArg       = "<hole>"
    show ColourArg        = "<option>"
    show NoArg            = ""
    show SpecialHeaderArg = "Arguments"
    show ConsoleWidthArg  = "auto|infinite|<number>"
    show DeclArg = "<top-level declaration>"
    show (ManyArgs a) = "(" ++ show a ++ ")..."
    show (OptionalArg a) = "[" ++ show a ++ "]"
    show (SeqArgs a b) = show a ++ " " ++ show b
extraHelp ::[([String], CmdArg, String)]
extraHelp =
    [ ([":casesplit!", ":cs!"], NoArg, ":cs! <line> <name> destructively splits the pattern variable on the line")
    , ([":addclause!", ":ac!"], NoArg, ":ac! <line> <name> destructively adds a clause for the definition of the name on the line")
    , ([":addmissing!", ":am!"], NoArg, ":am! <line> <name> destructively adds all missing pattern matches for the name on the line")
    , ([":makewith!", ":mw!"], NoArg, ":mw! <line> <name> destructively adds a with clause for the definition of the name on the line")
    , ([":proofsearch!", ":ps!"], NoArg, ":ps! <line> <name> <names> destructively does proof search for name on line, with names as hints")
    , ([":addproofclause!", ":apc!"], NoArg, ":apc! <line> <name> destructively adds a pattern-matching proof clause to name on line")
    , ([":refine!", ":ref!"], NoArg, ":ref! <line> <name> <name'> destructively attempts to partially solve name on line, with name' as hint, introducing holes for arguments that aren't inferrable")
    ]