+{-# OPTIONS -cpp #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.Regex
-- interface in "Text.Regex.Posix".
--
-----------------------------------------------------------------------------
-
+#include "config.h"
module Text.Regex (
-- * Regular expressions
Regex,
+#if defined(HAVE_REGEX_H)
mkRegex,
mkRegexWithOpts,
matchRegex,
matchRegexAll
+#endif
) where
import Prelude
import Text.Regex.Posix ( Regex )
import System.IO.Unsafe
+#if defined(HAVE_REGEX_H)
-- | Makes a regular expression with the default options (multi-line,
-- case-sensitive). The syntax of regular expressions is
-- otherwise that of @egrep@ (i.e. POSIX \"extended\" regular
matchRegexAll p str = unsafePerformIO (RE.regexec p str)
+#endif