-- exportExp e = error $ "exportExp: expression not supported: " ++ show e

-- | exports command to Reduce Format
exportReduce :: Named CMD -> String
exportReduce namedcmd = case sentence namedcmd of
  Cmd "simplify" exps -> exportExp $ head exps
  Cmd "ask" exps -> exportExp $ head exps
  Cmd cmd exps -> cmd ++ "(" ++ exportExps exps ++ ")"
  _ -> error "exportReduce: not implemented for this case" -- TODO: implement


{- ----------------------------------------------------------------------
Reduce Parsing
---------------------------------------------------------------------- -}

-- | removes the newlines 4: from the beginning of the string
exportReduce :: Named CMD -> String
exportReduce namedcmd = case sentence namedcmd of
  Cmd "simplify" exps -> exportExp $ head exps
  Cmd "ask" exps -> exportExp $ head exps
  Cmd cmd exps -> cmd ++ "(" ++ exportExps exps ++ ")"
  _ -> error "exportReduce: not implemented for this case" -- TODO: implement


{- ----------------------------------------------------------------------
Reduce Parsing
---------------------------------------------------------------------- -}

-- | removes the newlines 4: from the beginning of the string
exportReduce namedcmd = case sentence namedcmd of
  Cmd "simplify" exps -> exportExp $ head exps
  Cmd "ask" exps -> exportExp $ head exps
  Cmd cmd exps -> cmd ++ "(" ++ exportExps exps ++ ")"
  _ -> error "exportReduce: not implemented for this case" -- TODO: implement


{- ----------------------------------------------------------------------
Reduce Parsing
---------------------------------------------------------------------- -}

-- | removes the newlines 4: from the beginning of the string