libraryArgs :: Args
libraryArgs = do
    ways        <- getLibraryWays
    withGhci    <- expr ghcWithInterpreter
    dynPrograms <- dynamicGhcPrograms <$> expr flavour
    pure [ if vanilla `elem` ways
           then  "--enable-library-vanilla"
           else "--disable-library-vanilla"
         , if vanilla `elem` ways && withGhci && not dynPrograms
           then  "--enable-library-for-ghci"
           else "--disable-library-for-ghci"
         , if profiling `elem` ways
           then  "--enable-library-profiling"
           else "--disable-library-profiling"
         , if dynamic `elem` ways
           then  "--enable-shared"
           else "--disable-shared" ]

-- TODO: LD_OPTS?
libraryArgs :: Args
libraryArgs = do
    ways        <- getLibraryWays
    withGhci    <- expr ghcWithInterpreter
    dynPrograms <- dynamicGhcPrograms <$> expr flavour
    pure [ if vanilla `elem` ways
           then  "--enable-library-vanilla"
           else "--disable-library-vanilla"
         , if vanilla `elem` ways && withGhci && not dynPrograms
           then  "--enable-library-for-ghci"
           else "--disable-library-for-ghci"
         , if profiling `elem` ways
           then  "--enable-library-profiling"
           else "--disable-library-profiling"
         , if dynamic `elem` ways
           then  "--enable-shared"
           else "--disable-shared" ]

-- TODO: LD_OPTS?
libraryArgs = do
    ways        <- getLibraryWays
    withGhci    <- expr ghcWithInterpreter
    dynPrograms <- dynamicGhcPrograms <$> expr flavour
    pure [ if vanilla `elem` ways
           then  "--enable-library-vanilla"
           else "--disable-library-vanilla"
         , if vanilla `elem` ways && withGhci && not dynPrograms
           then  "--enable-library-for-ghci"
           else "--disable-library-for-ghci"
         , if profiling `elem` ways
           then  "--enable-library-profiling"
           else "--disable-library-profiling"
         , if dynamic `elem` ways
           then  "--enable-shared"
           else "--disable-shared" ]

-- TODO: LD_OPTS?