You start up GHCi and ask it to add module Foo to the context,
you expect to get p:Foo.

GHCi finds the file Foo.hs in the current directory. It assumes
that this contains module Foo from the main package: main:Foo.
Modules from the main package take precedence over package modules
for the purposes of import and :module.

Since you haven't loaded main:Foo in your current GHCi session,
GHCi emits an error to that effect.