TITLE: Moduli space of flat bundles
QUESTION [7 upvotes]: Is there a good place to learn about the structure of moduli stack of flat $G$-bundles on an algebraic curve?
Of course, we're just studying representations of a group $\pi_1(X)\to G$ modulo some conjugation (that's why it should be a stack). Since this is very similar to Galois representations in number theory, I wonder if there's a reference that also explains the similarities and differences between the two cases.

REPLY [16 votes]: You have to be a bit careful here. Over $\mathbb{C}$ the stack of representations of $\pi_{1}(X)$ in $G$ and the stack of flat algebraic $G$-bundles on $X$ are isomorphic  as complex analytic stacks but are not isomorphic as algebraic stacks. In fact the algebraic structure on the stack of flat $SL_{n}(\mathbb{C})$ bundles on $X$ reconstructs the curve $X$, while the stack of representations of $\pi_{1}(X)$ into $SL_{n}(\mathbb{C})$  depends only on the genus of $X$ and not on the particular curve $X$.
As for references I suggest you take a look at Carlos Simpson's papers "Moduli of representations of the fundamental group of a smooth projective variety, I and II" which you can find here and here.