Detention Need Not be Incarceration. Wang v Canada
In Wang v. Canada (Ont CA, 2018) the court states the 'detention' need not be situations of formal incarceration:
 In my view, the application judge erred in the above conclusion [whether there was no 'detention': ed.]. 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. ....
 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).....
 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.]