packages feed

HsHyperEstraier 0.2.1 → 0.3

raw patch · 6 files changed

+17/−16 lines, 6 filessetup-changed

Files

HsHyperEstraier.cabal view
@@ -5,16 +5,16 @@     Haskell. HyperEstraier is an embeddable full text search engine     which is supposed to be independent to any particular natural     languages.-Version:       0.2.1+Version:       0.3 License:       PublicDomain License-File:  COPYING Author:        PHO <pho at cielonegro dot org> Maintainer:    PHO <pho at cielonegro dot org> Stability:     experimental-Homepage:      http://ccm.sherry.jp/HsHyperEstraier/+Homepage:      http://cielonegro.org/HsHyperEstraier.html Category:      Text Tested-With:   GHC == 6.8.1-Cabal-Version: >= 1.2+Cabal-Version: >= 1.2.3 Build-Type:    Simple  Extra-Source-Files:
NEWS view
@@ -1,3 +1,6 @@+Changes from 0.2.1 to 0.3+* Fixed breakage on GHC 6.10.1. And now it requires 6.10.1...+ Changes from 0.2 to 0.2.1 ------------------------- * Only changes to various meta-data; no semantical changes to the code itself.
Setup.hs view
@@ -1,4 +1,4 @@ #!/usr/bin/env runghc  import Distribution.Simple-main = defaultMainWithHooks defaultUserHooks+main = defaultMainWithHooks simpleUserHooks
Text/HyperEstraier/Condition.hsc view
@@ -1,6 +1,6 @@ #include "estraier.h" --- #prune+{-# OPTIONS_HADDOCK prune #-}  -- |An interface to functions to manipulate search conditions. 
Text/HyperEstraier/Database.hsc view
@@ -66,7 +66,6 @@ import           Data.Bits import qualified Data.ByteString as Strict (ByteString) import qualified Data.ByteString.Char8 as C8 hiding (ByteString)-import           Data.Dynamic import           Data.IORef import           Data.Maybe import           Data.Typeable@@ -82,8 +81,7 @@ import           Text.HyperEstraier.Document import           Text.HyperEstraier.Utils --- |'EstError' represents an error occured on various operations. It--- is usually thrown as a 'Control.Exception.DynException'.+-- |'EstError' represents an error occured on various operations. data EstError     = InvalidArgument -- ^ An argument passed to the function was invalid.     | AccessForbidden -- ^ The operation is forbidden.@@ -94,7 +92,11 @@     | MiscError       -- ^ Errors for other reasons.     deriving (Eq, Show, Typeable) +instance Exception EstError where+    toException = SomeException+    fromException (SomeException e) = cast e + unmarshalError :: Int -> EstError unmarshalError (#const ESTEINVAL ) = InvalidArgument unmarshalError (#const ESTEACCES ) = AccessForbidden@@ -372,10 +374,6 @@ wrapDB dbPtr = newIORef dbPtr >>= return . Database  -throwEstError :: EstError -> IO a-throwEstError = throwIO . DynException . toDyn-- withDBPtr :: Database -> (Ptr ESTMTDB -> IO a) -> IO a withDBPtr (Database ref) f     = do dbPtr <- readIORef ref@@ -394,7 +392,7 @@       openDB' :: IO Database       openDB' = do ret <- openDatabase fpath opts                    case ret of-                     Left  err -> throwEstError err+                     Left  err -> throwIO err                      Right db  -> return db  -- |@'openDatabase' fpath mode@ opens a database at @fpath@. If it@@ -428,14 +426,14 @@           = alloca $ \ errPtr ->             do ret <- _close dbPtr errPtr                case ret of-                 0 -> peek errPtr >>= throwEstError . unmarshalError+                 0 -> peek errPtr >>= throwIO . unmarshalError                  _ -> writeIORef ref nullPtr   throwLastError :: Database -> IO a throwLastError db     = withDBPtr db $ \ dbPtr ->-      _error dbPtr >>= throwEstError . unmarshalError+      _error dbPtr >>= throwIO . unmarshalError   throwLastErrorIf :: Database -> Bool -> IO ()
Text/HyperEstraier/Document.hsc view
@@ -1,4 +1,4 @@--- #prune+{-# OPTIONS_HADDOCK prune #-}  -- |An interface to manipulate documents of the HyperEstraier.