Q:

How to fix a "could not find module" error in Cabal, when it seems correctly specified?

I'm currently not using stack at all on this project (just Cabal), and all was going well when everything was in Main.hs. I decided to split up code, moving my dhall dep and related code from my executable deps to my library deps, and now seem to have this strange error when running cabal new-build:
Building executable 'FarmDataServer.exe' for FarmDataServer-0.1.0.0..                                                                                                                                      
<no location info>: warning: [-Wmissing-home-modules]                                                                                 
    These modules are needed for compilation but not listed in your .cabal file's other-modules: FDS                                  
                                                                                                 FDS.Config.Core                      
                                                                                                 FDS.Config.DhallConf                 
[2 of 4] Compiling FDS.Config.DhallConf ( src/FDS/Config/DhallConf.hs, /home/brandon/workspace/CIDA/FarmDataServer/dist-newstyle/buil
d/x86_64-linux/ghc-8.4.4/FarmDataServer-0.1.0.0/x/FarmDataServer.exe/build/FarmDataServer.exe/FarmDataServer.exe-tmp/FDS/Config/Dhall
Conf.o )                                                                                                                              

src/FDS/Config/DhallConf.hs:7:1: error:                                                                                               
    Could not find module `Dhall'                                                                                                     
    Use -v to see a list of the files searched for.                                                                                   
  |                                                                                                                                   
7 | import           Dhall                                                                                                            
  | ^^^^^^^^^^^^^^^^^^^^^^     

Certainly I'm also a bit confused by the Wmissing-home-modules message since I seem to have added those in my cabal file.
Relevant bits of my .cabal file:
cabal-version:       2.4
name:                FarmDataServer
version:             0.1.0.0

library
  exposed-modules:
    FDS

  other-modules:
    FDS.Config.Core
    , FDS.Config.DhallConf

  build-depends:       base             ^>=4.11.1.0
                       , conduit        ^>=1.3.1
                       , csv-conduit    ^>=0.7.0.0
                       , dhall          ^>=1.20.0
                       , text           ^>=1.2.3.1

  hs-source-dirs:      src

executable FarmDataServer.exe
  main-is:             Main.hs

  build-depends:       base             ^>=4.11.1.0
                       , conduit        ^>=1.3.1
                       , csv-conduit    ^>=0.7.0.0
                       , scotty         ^>=0.11.3
                       , text           ^>=1.2.3.1
                       , FarmDataServer ^>=0.1.0.0

My src folder:
$ pwd                                                                                                                                 
/home/brandon/workspace/CIDA/FarmDataServer/src
$ du -a                                                                                                                               
4       ./FDS/Config/DhallConf.hs                                                                                                     
4       ./FDS/Config/Core.hs                                                                                                          
12      ./FDS/Config                                                                                                                  
16      ./FDS                                                                                                                         
4       ./FDS.hs                                                                                                                      
4       ./Main.hs                                                                                                                     
28      .      

A:

For the missing modules, sink your program executable into a directory such that the module hierarchy for yoru library isn't visible:
mkdir program ; mv src/Main.hs program/

and in cabal for the executable
hs-source-dirs: program

For your missing module Dhall, add the dhall build dependency to your executable stanza in the cabal file.

