command :: Parser Command
command = choice $ map (skipSpace >>)[post_, wall_, follow_, read_]
  where post_ :: Parser Command
        post_ = do _author <- T.strip  <$> A.takeWhile (/= '-')
                   string "->"
                   _content <- T.strip <$> takeText
                   return (POST Message{..})
        read_ :: Parser Command
        read_ = do _userName <- T.strip <$> takeText
                   return READ{..}
        wall_ :: Parser Command
        wall_ = do _userName <- T.strip <$> A.takeWhile (not . isSpace)
                   skipSpace
                   string "wall"
                   return WALL{..}
        follow_ :: Parser Command
        follow_ = do _who <- T.strip <$> A.takeWhile (not . isSpace)
                     skipSpace
                     string "follows"
                     skipSpace
                     _whom <- T.strip <$> A.takeWhile (not . isSpace)
                     return FOLLOW{..}
command :: Parser Command
command = choice $ map (skipSpace >>)[post_, wall_, follow_, read_]
  where post_ :: Parser Command
        post_ = do _author <- T.strip  <$> A.takeWhile (/= '-')
                   string "->"
                   _content <- T.strip <$> takeText
                   return (POST Message{..})
        read_ :: Parser Command
        read_ = do _userName <- T.strip <$> takeText
                   return READ{..}
        wall_ :: Parser Command
        wall_ = do _userName <- T.strip <$> A.takeWhile (not . isSpace)
                   skipSpace
                   string "wall"
                   return WALL{..}
        follow_ :: Parser Command
        follow_ = do _who <- T.strip <$> A.takeWhile (not . isSpace)
                     skipSpace
                     string "follows"
                     skipSpace
                     _whom <- T.strip <$> A.takeWhile (not . isSpace)
                     return FOLLOW{..}
command = choice $ map (skipSpace >>)[post_, wall_, follow_, read_]
  where post_ :: Parser Command
        post_ = do _author <- T.strip  <$> A.takeWhile (/= '-')
                   string "->"
                   _content <- T.strip <$> takeText
                   return (POST Message{..})
        read_ :: Parser Command
        read_ = do _userName <- T.strip <$> takeText
                   return READ{..}
        wall_ :: Parser Command
        wall_ = do _userName <- T.strip <$> A.takeWhile (not . isSpace)
                   skipSpace
                   string "wall"
                   return WALL{..}
        follow_ :: Parser Command
        follow_ = do _who <- T.strip <$> A.takeWhile (not . isSpace)
                     skipSpace
                     string "follows"
                     skipSpace
                     _whom <- T.strip <$> A.takeWhile (not . isSpace)
                     return FOLLOW{..}