Is it possible (sure it is) to run this kind of loop only when the server is disabled and server otherwise in the “main loop”?

Something like:

```haskell
if runServer then server conf port else loop
```