  Heavy quarks, i.e. charm and beauty, are sensitive probes of the medium
produced in high-energy heavy-ion collisions. They are produced in the early
stage of the collision, mainly in hard partonic scattering processes, and are
expected to experience the whole collision evolution interacting with the
medium constituents via both elastic and inelastic processes. The nuclear
modification factor ($R_{\rm AA}$) is one of the main experimental observables
that allow us to investigate the interaction strength of heavy quarks with the
medium. The ALICE collaboration measured the production of open heavy-flavour
hadrons via their semi-leptonic decays to electrons at mid-rapidity and to
muons at forward rapidity in elementary proton-proton (pp) collisions as well
as p--Pb, Pb--Pb and in Xe--Xe collisions. Recent results will be discussed,
and model calculations including the interaction of heavy quarks with the hot
and dense QCD medium will be compared with the data.
