It tests the legality of a detention or a restraint and the goal is to use it really almost i guess it's an emergency basis. A writ of habeas corpus is used to bring a prisoner or other detainee (e.g.The petition for writ of habeas corpus is GRANTED. Respondent's motion to dismiss is respectfully DENIED. This article offers trial practitioners a synopsis of the extraordinary writs most courts use to review interlocutory orders and actions. The purpose of the remedy sought in a writ of habeas corpus is to determine the legality of the restraint under which a person has been held. After the judgment and sentence were affirmed, there followed a series of communications between Robinson=s appellate counsel and CCR in which the latter. In many countries, authorities may incarcerate someone for months or years without charging them. We routinely utilizes these writs, which include habeas corpus, mandamus, prohibition, and certiorari. Below are a few examples of this type of litigation.