3 -- Copyright (c) 2002 Manuel M T Chakravarty & Gabriele Keller
5 -- Information for modules outside of the flattening module collection.
7 --- DESCRIPTION ---------------------------------------------------------------
9 -- This module contains information that is needed, and thus imported, by
10 -- modules that are otherwise independent of flattening and may in fact be
11 -- directly or indirectly imported by some of the flattening-related
12 -- modules. This is to avoid cyclic module dependencies.
14 --- DOCU ----------------------------------------------------------------------
16 -- Language: Haskell 98
18 --- TODO ----------------------------------------------------------------------
22 namesNeededForFlattening
25 import CmdLineOpts (opt_Flatten)
26 import NameSet (FreeVars, emptyFVs, mkFVs)
27 import PrelNames (fstName, andName, orName, lengthPName, replicatePName,
28 mapPName, bpermutePName, bpermuteDftPName, indexOfPName)
31 -- this is a list of names that need to be available if flattening is
32 -- performed (EXPORTED)
34 -- * needs to be kept in sync with the names used in Core generation in
35 -- `FlattenMonad' and `NDPCoreUtils'
37 namesNeededForFlattening :: FreeVars
38 namesNeededForFlattening
39 | not opt_Flatten = emptyFVs -- none without -fflatten
41 = mkFVs [fstName, andName, orName, lengthPName, replicatePName, mapPName,
42 bpermutePName, bpermuteDftPName, indexOfPName]
43 -- stuff from PrelGHC doesn't have to go here