Add {-# OPTIONS_GHC -w #-} and some blurb to all compiler modules
[ghc-hetmet.git] / compiler / ndpFlatten / FlattenInfo.hs
1 --  $Id$
2 --
3 --  Copyright (c) 2002 Manuel M T Chakravarty & Gabriele Keller
4 --
5 --  Information for modules outside of the flattening module collection.
6 --
7 --- DESCRIPTION ---------------------------------------------------------------
8 --
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.
13 -- 
14 --- DOCU ----------------------------------------------------------------------
15 --
16 --  Language: Haskell 98
17 --
18 --- TODO ----------------------------------------------------------------------
19 --
20
21 {-# OPTIONS_GHC -w #-}
22 -- The above warning supression flag is a temporary kludge.
23 -- While working on this module you are encouraged to remove it and fix
24 -- any warnings in the module. See
25 --     http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings
26 -- for details
27
28 module FlattenInfo (
29   namesNeededForFlattening
30 ) where
31
32 import StaticFlags (opt_Flatten)
33 import NameSet     (FreeVars, emptyFVs, mkFVs)
34 import PrelNames   (fstName, andName, orName, lengthPName, replicatePName,
35                     mapPName, bpermutePName, bpermuteDftPName, indexOfPName)
36
37
38 -- this is a list of names that need to be available if flattening is
39 -- performed (EXPORTED)
40 --
41 --  * needs to be kept in sync with the names used in Core generation in
42 --   `FlattenMonad' and `NDPCoreUtils'
43 --
44 namesNeededForFlattening :: FreeVars
45 namesNeededForFlattening
46   | not opt_Flatten = emptyFVs          -- none without -fflatten
47   | otherwise
48   = mkFVs [fstName, andName, orName, lengthPName, replicatePName, mapPName,
49            bpermutePName, bpermuteDftPName, indexOfPName]
50     -- stuff from PrelGHC doesn't have to go here