You need a helper function that calls your recursive function, as there's only one case in which you want to prepend "0" (when the number is 0).
toBinary' :: Integer -> String
toBinary' 0 = ""
toBinary' x = toBinary' (div x 2) ++ show (mod x 2)
toBinary :: Integer -> String
toBinary 0 = "0"
toBinary x = toBinary' x
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…