----------------------

pCommand calculus =
  jL "r" +.. pGoalId ... pJ (jL "A" +.. pIntc ||| succeed 1) ...
             pJ (jL "S" +.. pIntc ||| succeed 1) ... pJ pRuleIdent
                         *** (\ (g,(i,(j,r))) -> CRefine g (i,j) r)
 |||
  jL "i" +.. pRuleIdent ... pJ pTerm
                         *** uncurry CInstance
 |||
  jL "x" +.. pRuleIdent  *** CAxioms
 |||
  jL "t" +.. pGoalId ... pJ pIntc
                         *** uncurry CTry
 |||
  jL "n" +.. pSequent    *** CNew
 |||
  jL "u" +.. pGoalId     *** CRemove
 |||
  jL "s"                 <<< CShowGoals
 |||
  jL "w"                 <<< CShowTree
 |||
  jL "a" +.. pGoalId     *** CShowApplicable
 |||
  jL "c" +.. pTList "+" pRuleIdent  *** CChange . Calculus
 |||
  jL "l" +.. (pRuleIdent ||| succeed "myproof")     *** CLatex
 |||
  jL "d" +.. (pRuleIdent ||| succeed "mydeduction") *** CNatural
 |||
  jL "h" +.. (pRuleIdent ||| succeed "myhistory.txt") *** CHistory
 |||
  jL "?"                 <<< CHelp
 |||
  jL "m"                 <<< CManual
 |||
  jL "q"                 <<< CQuit
pCommand calculus =
  jL "r" +.. pGoalId ... pJ (jL "A" +.. pIntc ||| succeed 1) ...
             pJ (jL "S" +.. pIntc ||| succeed 1) ... pJ pRuleIdent
                         *** (\ (g,(i,(j,r))) -> CRefine g (i,j) r)
 |||
  jL "i" +.. pRuleIdent ... pJ pTerm
                         *** uncurry CInstance
 |||
  jL "x" +.. pRuleIdent  *** CAxioms
 |||
  jL "t" +.. pGoalId ... pJ pIntc
                         *** uncurry CTry
 |||
  jL "n" +.. pSequent    *** CNew
 |||
  jL "u" +.. pGoalId     *** CRemove
 |||
  jL "s"                 <<< CShowGoals
 |||
  jL "w"                 <<< CShowTree
 |||
  jL "a" +.. pGoalId     *** CShowApplicable
 |||
  jL "c" +.. pTList "+" pRuleIdent  *** CChange . Calculus
 |||
  jL "l" +.. (pRuleIdent ||| succeed "myproof")     *** CLatex
 |||
  jL "d" +.. (pRuleIdent ||| succeed "mydeduction") *** CNatural
 |||
  jL "h" +.. (pRuleIdent ||| succeed "myhistory.txt") *** CHistory
 |||
  jL "?"                 <<< CHelp
 |||
  jL "m"                 <<< CManual
 |||
  jL "q"                 <<< CQuit
pCommand calculus =
  jL "r" +.. pGoalId ... pJ (jL "A" +.. pIntc ||| succeed 1) ...
             pJ (jL "S" +.. pIntc ||| succeed 1) ... pJ pRuleIdent
                         *** (\ (g,(i,(j,r))) -> CRefine g (i,j) r)
 |||
  jL "i" +.. pRuleIdent ... pJ pTerm
                         *** uncurry CInstance
 |||
  jL "x" +.. pRuleIdent  *** CAxioms
 |||
  jL "t" +.. pGoalId ... pJ pIntc
                         *** uncurry CTry
 |||
  jL "n" +.. pSequent    *** CNew
 |||
  jL "u" +.. pGoalId     *** CRemove
 |||
  jL "s"                 <<< CShowGoals
 |||
  jL "w"                 <<< CShowTree
 |||
  jL "a" +.. pGoalId     *** CShowApplicable
 |||
  jL "c" +.. pTList "+" pRuleIdent  *** CChange . Calculus
 |||
  jL "l" +.. (pRuleIdent ||| succeed "myproof")     *** CLatex
 |||
  jL "d" +.. (pRuleIdent ||| succeed "mydeduction") *** CNatural
 |||
  jL "h" +.. (pRuleIdent ||| succeed "myhistory.txt") *** CHistory
 |||
  jL "?"                 <<< CHelp
 |||
  jL "m"                 <<< CManual
 |||
  jL "q"                 <<< CQuit