Statistics
| Branch: | Tag: | Revision:

root / htools / Ganeti / HTools / Compat.hs @ 2ef8013f

History | View | Annotate | Download (1.4 kB)

1
{-# LANGUAGE CPP #-}
2

    
3
{- | Compatibility helper module.
4

    
5
This module holds definitions that help with supporting multiple library versions or transitions between versions.
6

    
7
-}
8

    
9
{-
10

    
11
Copyright (C) 2011 Google Inc.
12

    
13
This program is free software; you can redistribute it and/or modify
14
it under the terms of the GNU General Public License as published by
15
the Free Software Foundation; either version 2 of the License, or
16
(at your option) any later version.
17

    
18
This program is distributed in the hope that it will be useful, but
19
WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21
General Public License for more details.
22

    
23
You should have received a copy of the GNU General Public License
24
along with this program; if not, write to the Free Software
25
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26
02110-1301, USA.
27

    
28
-}
29

    
30
module Ganeti.HTools.Compat
31
    ( rwhnf
32
    , Control.Parallel.Strategies.parMap
33
    ) where
34

    
35
import qualified Control.Parallel.Strategies
36

    
37
-- | Wrapper over the function exported from
38
-- "Control.Parallel.Strategies".
39
--
40
-- This wraps either the old or the new name of the function,
41
-- depending on the detected library version.
42
rwhnf :: Control.Parallel.Strategies.Strategy a
43
#ifdef PARALLEL3
44
rwhnf = Control.Parallel.Strategies.rseq
45
#else
46
rwhnf = Control.Parallel.Strategies.rwhnf
47
#endif