It is well known that locales are much more well behaved in a constructive setting than topological spaces. Nevertheless, many authors develop the theory of locales in classical mathematics. Are there any textbooks in which the theory is treated constructively?


I'm actually interested in specific questions. First, let us define a map of locales to be an open (resp., closed) embedding if it is a pullback of the open (resp., closed) point of the Sierpiński locale. We say that a locale $X$ is discrete if the diagonal $X \to X \times X$ is open. We say that $X$ is Hausdorff if the diagonal is closed. Now, my questions are:


1. Are these definitions reasonable in a constructive setting?
2. Is it true that the locale corresponding to the frame of subsets of a set is discrete? I think I can prove this for discrete sets (that is, sets with decidable equality). Also, are there some implications in the converse direction? My guess is that the answer to both questions is "no", but I don't have any counterexamples.
3. How discrete, Hausdorff, and spatial locales are related? Again, I cannot prove this, but I guess there are no implications between these notions.



Locales in constructive mathematics
For this type of question the first reference that comes to my mind is P.T.Johnstone Sketches of an elephant, part C. 


Most of the results in this book are constructively valid: If a result is proved over an arbitrary base (either a topos or a locale), it means that it is constructive, the few non-constructive result present in the book are those that explicit refers to the category "Set".


To answer your more specific questions:


1) One generally says that a locale is discrete if its diagonal map is an open embeddings and if the map $X \rightarrow 1$ is open (in the sense of open morphisms of locales, see for example sketches section C3.1, the second condition is automatic in classical mathematics, but not in constructive mathematics).
With this modification they are the standard definitions (at least equivalent to them, we generally don't invoke the Sierpinski locale to define what are open and closed subsets, they just corresponds to the element sof the defining frame).


The only things you might want to be careful about is that for a spatial locale, being Hausdorff in this sense is not exactly equivalent to the fact that the corresponding topological space is Hausdroff, but this is already the case in classical mathematics (because the products in the category of locales might differs from the product in the category of topological spaces).


2) With the modified notion, a locale is discrete if and only if it is the frame of subset of a set. (Lemma C3.1.15 of sketches of an elephant). The corresponding set is decidable if and only if the locale is Hausdorff.


3) Because of point $(2)$ one has that:


Discrete => spatial


and "Discrete => Hausdroff" is essentially equivalent to the law of excluded middle.


But there is no other implications: boolean locales are Hausdorff but not spatial nor discrete, and spatial locale can be both discrete and non discrete and both Hausdorff and non Hausdorff.


This being said, there is one more implication that will be of interest regarding your question:


If $X$ is spatial then the map $X \rightarrow 1$ is open (C3.1.16 in sketches). So with your definition of discrete what is true is that $X$ corresponds to a set if and only if $X$ is discrete and spatial.


