I would like to check that I am using the ‘correct’, current Cabal terminology around ‘sublibraries’ - as I want to be up-to-date and consistent in the naming of certain identifiers used in the Stack project. Is the following ‘accurate’?
A Cabal package can include an optional ‘main’ library and zero or more named ‘sublibraries’. A sublibrary has a ‘visibility’ that is either ‘public’ or ‘private’. (The ‘main’ library is always public.) Before Cabal 3.0, all sublibraries were private and were referred to as ‘internal’ libraries. Before Cabal 2.0, a Cabal package could not include sublibraries.
EDIT (26 Oct 2023): Given the discussion below, I would now recast my text above as follows:
A Cabal package can include zero or more library components, being an optional ‘main’ unnamed library and/or zero or more named ‘subsidiary’ or ‘ancillary’ libraries (abbreviated as ‘sublibraries’). A sublibrary has a ‘visibility’ that is either ‘public’ or ‘private’. (The ‘main’ unnamed library is always public.) Before Cabal 3.0, all sublibraries were private and were, consequently, referred to as ‘internal’ libraries. Before Cabal 2.0, a Cabal package could not include sublibraries.