Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti / Compat.hs @ 7b9ceea7

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