5.- (2) Any person who is arrested or detained shall be entitled
(d) to the remedy by way of habeas corpus for determining the validity of his detention.
5.- (6) Any person who is unlawfully arrested or detained by any other person shall be entitled to compensation therefor from that other person or from any other person or authority on whose behalf that other person was acting:
Provided that no person shall be liable for any act done in the performance of a judicial function for which he would not be liable apart from this subsection..
1. In respect of an investigation under this Statute, a person:
(d) Shall not be subjected to arbitrary arrest or detention, and shall not be deprived of his or her liberty except on such grounds and in accordance with such procedures as are established in this Statute.