To a census-taker, who asked him in 1872 if he was a Catholic, Hugo replied, "No. A Freethinker." Hugo predicted that Christianity would soon disappear, but men would still believe in God.
Carlyle abandoned his Christian beliefs in 1818 after reading Gibbon. After further study... Carlyle gave up the Holy Ghost and immortality, as well, adopting a Pantheism like Goethe's.