Statistics
| Branch: | Tag: | Revision:

root / htools / Ganeti / HTools / Compat.hs @ 61bbbed7

History | View | Annotate | Download (1.4 kB)

1 1adec4be Iustin Pop
{-# LANGUAGE CPP #-}
2 1adec4be Iustin Pop
3 1adec4be Iustin Pop
{- | Compatibility helper module.
4 1adec4be Iustin Pop
5 1adec4be Iustin Pop
This module holds definitions that help with supporting multiple library versions or transitions between versions.
6 1adec4be Iustin Pop
7 1adec4be Iustin Pop
-}
8 1adec4be Iustin Pop
9 1adec4be Iustin Pop
{-
10 1adec4be Iustin Pop
11 1adec4be Iustin Pop
Copyright (C) 2011 Google Inc.
12 1adec4be Iustin Pop
13 1adec4be Iustin Pop
This program is free software; you can redistribute it and/or modify
14 1adec4be Iustin Pop
it under the terms of the GNU General Public License as published by
15 1adec4be Iustin Pop
the Free Software Foundation; either version 2 of the License, or
16 1adec4be Iustin Pop
(at your option) any later version.
17 1adec4be Iustin Pop
18 1adec4be Iustin Pop
This program is distributed in the hope that it will be useful, but
19 1adec4be Iustin Pop
WITHOUT ANY WARRANTY; without even the implied warranty of
20 1adec4be Iustin Pop
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 1adec4be Iustin Pop
General Public License for more details.
22 1adec4be Iustin Pop
23 1adec4be Iustin Pop
You should have received a copy of the GNU General Public License
24 1adec4be Iustin Pop
along with this program; if not, write to the Free Software
25 1adec4be Iustin Pop
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 1adec4be Iustin Pop
02110-1301, USA.
27 1adec4be Iustin Pop
28 1adec4be Iustin Pop
-}
29 1adec4be Iustin Pop
30 1adec4be Iustin Pop
module Ganeti.HTools.Compat
31 1adec4be Iustin Pop
    ( rwhnf
32 1adec4be Iustin Pop
    , Control.Parallel.Strategies.parMap
33 1adec4be Iustin Pop
    ) where
34 1adec4be Iustin Pop
35 1adec4be Iustin Pop
import qualified Control.Parallel.Strategies
36 1adec4be Iustin Pop
37 179c0828 Iustin Pop
-- | Wrapper over the function exported from
38 179c0828 Iustin Pop
-- "Control.Parallel.Strategies".
39 179c0828 Iustin Pop
--
40 179c0828 Iustin Pop
-- This wraps either the old or the new name of the function,
41 179c0828 Iustin Pop
-- depending on the detected library version.
42 1adec4be Iustin Pop
rwhnf :: Control.Parallel.Strategies.Strategy a
43 1adec4be Iustin Pop
#ifdef PARALLEL3
44 1adec4be Iustin Pop
rwhnf = Control.Parallel.Strategies.rseq
45 1adec4be Iustin Pop
#else
46 1adec4be Iustin Pop
rwhnf = Control.Parallel.Strategies.rwhnf
47 1adec4be Iustin Pop
#endif