-- ToDo: should have an interface using PackedStrings.
#ifndef __NHC__
-#include "ghcconfig.h"
+#include "HsBaseConfig.h"
#else
#define HAVE_REGEX_H 1
#define HAVE_REGCOMP 1
) where
+import Prelude
+
+import Foreign
+import Foreign.C
+
+type CRegex = ()
+
+-- | A compiled regular expression
+newtype Regex = Regex (ForeignPtr CRegex)
+
+
+-- The C-library backend
#include <sys/types.h>
#if HAVE_REGEX_H && HAVE_REGCOMP
{-# CFILES cbits/regex/regfree.c #-}
#endif
-import Prelude
-
-import Foreign
-import Foreign.C
-
-type CRegex = ()
-
--- | A compiled regular expression
-newtype Regex = Regex (ForeignPtr CRegex)
-
-- -----------------------------------------------------------------------------
-- regcomp