Wang v. Canada (Ont CA, 2018)
In this case the court discusses how habeas corpus is not restricted to situations of incarceration by the state:
 In my view, the application judge erred in the above conclusion. He did so in two related respects. One is that he equated detention for the purposes of habeas corpus with incarceration in a custodial facility. The other is that he appears to have restricted the operation of habeas corpus only to situations where a person is formally detained rather than to broader situations where liberty interests are infringed. Put more simply, the application judge wrongly concluded that in order for there to be an infringement of liberty, to which the writ of habeas corpus could apply, there had to be a detention of the individual in a custodial facility. That view does not find support in the case law nor does it accord with the fundamental constitutional values that underlie the important remedy reflected in the principle of habeas corpus. In order to explain my conclusion, a review of some of the applicable case law is required.
 Before embarking on that review, however, I would point out that the scope of the writ of habeas corpus constitutes a question of law. The standard of review is, thus, one of correctness: Housen v. Nikolaisen, 2002 SCC 33 (CanLII),  2 S.C.R. 235, at para. 8.
 I begin with the decision in May v. Ferndale Institution, 2005 SCC 82 (CanLII),  3 S.C.R. 809. While May involved a challenge by federal inmates to the reclassification of their security level within the federal penitentiary system, and was thus factually distinct from the situation here, the importance of the decision for current purposes lies in its review of the history and principles surrounding habeas corpus.
 The majority in May reviewed the purpose behind the writ of habeas corpus. Fish and LeBel JJ., at para. 21, quoted from a decision of Black J. in the United States Supreme Court where he said that the purpose of habeas corpus was “the protection of individuals against erosion of their right to be free from wrongful restraints upon their liberty”. That protection was stated in broad terms. It was not restricted to imprisonment but to any restraint on a person’s liberty. Such restraints can take many different forms.
 The decision in May went on to consider other cases that had touched on the purpose of habeas corpus. It referred to the Supreme Court of Canada’s trilogy of decisions in R. v. Miller, 1985 CanLII 22 (SCC),  2 S.C.R. 613; Cardinal v. Director of Kent Institution, 1985 CanLII 23 (SCC),  2 S.C.R. 643; Morin v. National Special Handling Review Committee, 1985 CanLII 24 (SCC),  2 S.C.R. 662. The court pointed out, at para. 31, that in Miller, Le Dain J. had also described habeas corpus as “the traditional means of challenging deprivations of liberty”. Again, there was no suggestion that the remedy was restricted to incarceration. The court then went on to consider the exceptions to the general right of an individual to resort to habeas corpus to challenge their detention, a subject to which I will return shortly.
 Lastly, the court reinforced the importance of the remedy of habeas corpus and the care which courts ought to take in making any determination that it was not available as a route to challenge restrictions on a person’s liberty. Fish and LeBel JJ. said, at para. 50:
Given the historical importance of habeas corpus in the protection of various liberty interests, jurisprudential developments limiting habeas corpus jurisdiction should be carefully evaluated and should not be allowed to expand unchecked. The exceptions to habeas corpus jurisdiction and the circumstances under which a superior court may decline jurisdiction should be well defined and limited. As referenced in May, there are two exceptions to the availability of habeas corpus. One is where a statute confers jurisdiction on a court of appeal to correct the errors of a lower court and to release the affected person, if necessary. The other is where a legislator has put in place a complete, comprehensive and expert procedure for review of an administrative decision affecting a person’s liberty.
 The first exception has no application to the circumstances here. Rather, it is the second exception upon which the respondents rely in this case and they do so based on the assertion that the Immigration and Refugee Protection Act is such a complete, comprehensive and expert procedure.
 The application judge did not directly address whether this second exception applied, presumably because he concluded that the appellants were not detained and therefore habeas corpus jurisdiction did not lie with the court. He did refer to this court’s decision on that issue in Chaudhary v. Canada (Minister of Public Safety and Emergency Preparedness), 2015 ONCA 700 (CanLII), 127 O.R. (3d) 401, but he did so only for the purpose of distinguishing the result in that case from the situation that was before him. He said, at para. 48:
In my view, the Court of Appeal in Chaudhary implicitly held that for habeas corpus purposes -- even in an immigration context -- detention means jail or imprisonment.In reaching that conclusion, the application judge referred to paras. 38-40 of the reasons in Chaudhary.
 I do not agree with the conclusion that the application judge drew from those three paragraphs. The first paragraph refers to the history of the prerogative writ and its purpose. The second paragraph refers to the fact that the remedy of habeas corpus is specifically guaranteed by s. 10(c) of the Canadian Charter of Rights and Freedoms. The third paragraph quotes from Justice Sharpe’s text on the subject. While the particular quotation taken by the application judge does refer to the traditional form of review as being directed to the “gaoler or person having custody” of the applicant, it also notably identifies the issue to be determined as being the reason why a person “is exercising restraint” over the applicant.
 In my view, Chaudhary does not support the narrow interpretation given by the application judge to the remedy of habeas corpus. Indeed, the rationale in Chaudhary, fairly read, would support the opposite view.
 Admittedly, the most common use of the writ of habeas corpus is where a person is being held in custody and they have not, for whatever reason, been granted a hearing respecting their qualification for release from custody. But there is nothing in the history of the remedy that would justify limiting its reach solely to situations where a person is being held in custody. The most common use should neither eclipse nor exclude other possible uses.
 The core protection afforded by the writ of habeas corpus is the protection of a person’s liberty. That is, the protection of the right that every individual has to go about their daily life without interference by the state. Where the state acts to restrict the liberty of the individual, then the individual must have the right to seek a review of the legitimacy of those restrictions. As Rouleau J.A. said in Chaudhary, at para. 94:
Habeas corpus issues as of right once a detainee proves a deprivation of liberty and raises a legitimate ground upon which to question the legality of that deprivation. (Emphasis added). This conclusion is also consistent with the proper approach to be taken to habeas corpus applications. As pointed out in Mission Institution v. Khela, 2014 SCC 24 (CanLII),  1 S.C.R. 502 at para. 30, habeas corpus applications proceed in two stages. First, the applicant must show that he or she has been deprived of liberty and that there is a legitimate ground upon which to question the legality of the detention. If the applicant succeeds in meeting that threshold, the onus shifts to the authorities to show that the deprivation of liberty is lawful.
 It is the first stage that we are concerned with in this case. Importantly, the first stage is not described as requiring the applicant to be detained in custody, or to be incarcerated, or to be held in a custodial facility, or any other such language. The key to the first stage is simply, but crucially, a deprivation of liberty. I note, on this point, that applicants must meet a low threshold at the jurisdictional stage of a habeas corpus application: Toure v. Canada (Minister of Public Safety and Emergency Preparedness), 2018 ONCA 681 (CanLII) at para. 51.
 In reaching his conclusion, the application judge placed considerable reliance on the decision in R. v. Ethier, 2009 CanLII 11429 (ON SC). In that case, the accused challenged the house arrest condition of his release on criminal charges through a habeas corpus application. The application judge dismissed the application, principally on the basis that habeas corpus had no role to play since there was a process within the Criminal Code to challenge bail determinations, as confirmed in R. v. Pearson, 1992 CanLII 52 (SCC),  3 S.C.R. 665. However, the application judge in Ethier also said, at para. 10:
The historical use of a Writ of Habeas Corpus directing a jailer to deliver up the person in custody is not applicable to the applicant following his release from detention. I note three things with respect to this statement. The first is that it was not central to the issue that the application judge had to determine in that case and thus could fairly be characterized as obiter. The second is that it was not, in any event, an authority that was binding on the application judge in the case at bar. The third, and most important, is that the statement is wrong in law. The application judge in Ethier made the same error that the application judge did here, that is, in restricting the scope of the writ of habeas corpus to situations of incarceration, that is, detention in its strictest form.
 As the decision in May makes clear, habeas corpus potentially applies to any situation where the state restrains the liberty of the subject. A person subject to house arrest is a person who has had their liberty restricted. They are unable to do that which every other ordinary citizen is entitled to do. As Sharpe J.A. aptly put it in his dissenting reasons in R. v. Panday, 2007 ONCA 598 (CanLII), 87 O.R. (3d) 1, at para. 63:
Bail and jail are different points on a continuum between complete freedom and total deprivation of liberty. Strict conditions amounting to house arrest significantly constrain liberty and push bail towards the total deprivation of liberty end of the continuum.See also R. v. Downes (2006), 2006 CanLII 3957 (ON CA), 79 O.R. (3d) 321 (C.A.), at para. 29.
 A further decision of importance to this issue is R. v. Gamble, 1988 CanLII 15 (SCC),  2 S.C.R. 595, where the writ of habeas corpus was used to challenge a parole ineligibility provision. Parole, of course, takes effect after a person is released from custody. In commenting on the flexibility that is important to the remedy, especially in the context of Charter rights, Wilson J. said, at para. 64:
There is no doubt that considerable uncertainty has clouded the scope of review open to a court on an application for habeas corpus and it is understandable that courts have, in general, not bound themselves to limited categories or definitions of jurisdictional review when the liberty of the subject was at stake. [Citations omitted.]