X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Text%2FRegex%2FPosix.hsc;h=50c7c00f0b0011d22af6742a65da5efc745e760f;hb=30464c0cb915c2ae900909568fa8677bba341e45;hp=f2dda5127933293db5c6961143732c6f10605c96;hpb=7d469fba03085e1538f7b33227a3b69fc68d037f;p=haskell-directory.git diff --git a/Text/Regex/Posix.hsc b/Text/Regex/Posix.hsc index f2dda51..50c7c00 100644 --- a/Text/Regex/Posix.hsc +++ b/Text/Regex/Posix.hsc @@ -14,7 +14,7 @@ -- 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 @@ -42,6 +42,18 @@ module Text.Regex.Posix ( ) where +import Prelude + +import Foreign +import Foreign.C + +type CRegex = () + +-- | A compiled regular expression +newtype Regex = Regex (ForeignPtr CRegex) + + +-- The C-library backend #include #if HAVE_REGEX_H && HAVE_REGCOMP @@ -57,16 +69,6 @@ module Text.Regex.Posix ( {-# 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