You have actually already solved your own problem, you just don't know it yet!
a function which decides if they are overlapping by checking that the distance between the two centeres is smaller than the sum of the radiuses(or radii)
I'll translate this sentence directly to Haskell:
a function which decides if they are overlapping
| by checking that the distance
| | between the two centres
| | | | is smaller than
| | | | | the sum of
| | | | | |
| | | | | the radiuses
| | | | | | | |
v v v v v v v v
overlap c1 c2 = distance (centre c1) (centre c2) < radius c1 + radius c2
To make this work, we need to define the two functions centre
and radius
, which get the centre point and the radius of a circle respectively.
centre c = fst c
radius c = snd c
It's as simple as that!