Changeset 20086 for third-party
- Timestamp:
- 03/08/08 00:28:00 (9 months ago)
- Location:
- third-party/HsJudy
- Files:
-
- 14 modified
-
HsJudy.cabal (modified) (2 diffs)
-
Judy/BitSet.hs (modified) (1 diff)
-
Judy/CollectionsM.hs (modified) (1 diff)
-
Judy/Hash.hs (modified) (1 diff)
-
Judy/HashIO.hs (modified) (2 diffs)
-
Judy/IntMap.hs (modified) (1 diff)
-
Judy/MiniGC.hs (modified) (1 diff)
-
Judy/Private.hsc (modified) (2 diffs)
-
Judy/Refeable.hs (modified) (1 diff)
-
Judy/StrMap.hs (modified) (1 diff)
-
Judy/Stringable.hs (modified) (1 diff)
-
tests/Test.hs (modified) (4 diffs)
-
tests/TestBS.hs (modified) (6 diffs)
-
tests/atom/PackedString.hs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
third-party/HsJudy/HsJudy.cabal
r19958 r20086 1 1 name: HsJudy 2 version: 0.1 2 version: 0.1.1 3 3 Category: Data 4 4 Synopsis: Judy bindings, and some nice APIs … … 32 32 Judy.CollectionsM Judy.HashIO Judy.Refeable Judy.Stringable 33 33 other-modules: Judy.Private Judy.MiniGC 34 extra-libraries: Judy 34 35 35 include-dirs: . ../judy/Judy-1.0.3/src 36 -- FIXME: make Cabal work nicely with _hsc files; now I think it works, but doesn't clean _hsc files 37 c-sources: Judy/Private_hsc.c 38 39 40 extensions: ForeignFunctionInterface, TypeSynonymInstances, MagicHash, 41 IncoherentInstances, UndecidableInstances 42 ghc-options: -fglasgow-exts -Wall -O2 -static ../judy/Judy-1.0.3/src/Judy1/*.o 43 ../judy/Judy-1.0.3/src/JudyL/*.o ../judy/Judy-1.0.3/src/JudySL/*.o 44 ../judy/Judy-1.0.3/src/JudyHS/*.o ../judy/Judy-1.0.3/src/JudyCommon/*.o 36 extensions: ForeignFunctionInterface, TypeSynonymInstances, MagicHash, MultiParamTypeClasses, FlexibleContexts, 37 IncoherentInstances, UndecidableInstances, DeriveDataTypeable, FlexibleInstances, FunctionalDependencies 38 ghc-options: -Wall -O2 -
third-party/HsJudy/Judy/BitSet.hs
r19958 r20086 1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-}1 {-# LANGUAGE UndecidableInstances, IncoherentInstances #-} 2 2 3 3 {-# INCLUDE "Judy.h" #-} -
third-party/HsJudy/Judy/CollectionsM.hs
r19958 r20086 1 {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-}1 {-# LANGUAGE UndecidableInstances, FunctionalDependencies, FlexibleContexts #-} 2 2 3 3 module Judy.CollectionsM ( -
third-party/HsJudy/Judy/Hash.hs
r19958 r20086 1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-}1 {-# LANGUAGE MultiParamTypeClasses, UndecidableInstances, IncoherentInstances #-} 2 2 3 3 {-# INCLUDE "Judy.h" #-} -
third-party/HsJudy/Judy/HashIO.hs
r19958 r20086 1 {-# LANGUAGE MagicHash #-}2 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances -fallow-overlapping-instances #-}1 {-# LANGUAGE MagicHash, FlexibleInstances, OverlappingInstances,IncoherentInstances, 2 IncoherentInstances, UndecidableInstances #-} 3 3 4 4 module Judy.HashIO ( … … 20 20 -- Two step conversion, first from Value -> Int then Int -> a 21 21 unHashIO :: Value -> IO a 22 23 22 24 23 instance Enum a => UniqueHashIO a where -
third-party/HsJudy/Judy/IntMap.hs
r19958 r20086 1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-}1 {-# LANGUAGE UndecidableInstances, IncoherentInstances #-} 2 2 3 3 {-# INCLUDE "Judy.h" #-} -
third-party/HsJudy/Judy/MiniGC.hs
r19958 r20086 1 1 {-# LANGUAGE DeriveDataTypeable #-} 2 2 {-# INCLUDE "Judy.h" #-} 3 3 -
third-party/HsJudy/Judy/Private.hsc
r19958 r20086 1 {-# LANGUAGE ForeignFunctionInterface #-} 2 1 3 -- | Low-level FFI 2 4 module Judy.Private where … … 5 7 6 8 #if __GLASGOW_HASKELL__ >= 605 7 import Data.Word9 -- import Data.Word 8 10 #else 9 11 import GHC.Exts -
third-party/HsJudy/Judy/Refeable.hs
r19958 r20086 1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-} 2 {-# LANGUAGE MagicHash, UndecidableInstances, IncoherentInstances #-} 1 {-# LANGUAGE MagicHash, UndecidableInstances, IncoherentInstances, FlexibleInstances #-} 3 2 module Judy.Refeable ( 4 3 Refeable (..) 5 4 ) where 6 7 8 5 9 6 import Foreign.StablePtr -
third-party/HsJudy/Judy/StrMap.hs
r19958 r20086 1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-}1 {-# LANGUAGE UndecidableInstances, IncoherentInstances #-} 2 2 3 3 {-# INCLUDE "Judy.h" #-} -
third-party/HsJudy/Judy/Stringable.hs
r19958 r20086 1 {-# OPTIONS -fglasgow-exts #-}2 1 {-# LANGUAGE TypeSynonymInstances #-} 3 2 -
third-party/HsJudy/tests/Test.hs
r11899 r20086 18 18 19 19 20 no_plan :: IO t -> IO () 20 21 no_plan test = do 21 22 test … … 23 24 putStrLn $ "1.." ++ (show total) 24 25 26 t :: String -> IO b -> IO b 25 27 t name test = say name >> test 26 28 … … 28 30 plan = putStrLn . ("1.." ++) . show 29 31 32 diag :: String -> IO () 30 33 diag = (hPutStrLn stderr) . ("# " ++) 31 34 32 35 -- Not best name, but a three char name.. 36 say :: String -> IO () 33 37 say = putStrLn . ("# " ++) 34 38 35 39 infix 0 .=>, ==>, =-=, .-= 36 40 37 41 (.=>) :: (Eq t, Show t) => IO t -> t -> IO () 38 42 (.=>) act v = do 39 43 x <- act 40 44 is_ x v 41 45 46 (==>) :: (Eq a, Show a) => a -> a -> IO () 42 47 (==>) a b = is_ a b 43 48 49 (.-=) :: (Show a, Ord a) => IO [a] -> [a] -> IO () 44 50 (.-=) act l = do 45 51 x <- act 46 52 is_ (sort x) (sort l) 47 53 54 (=-=) :: (Show a, Ord a) => [a] -> [a] -> IO () 48 55 (=-=) a b = is_ (sort a) (sort b) 49 56 57 is_ :: (Show a, Eq a) => a -> a -> IO () 50 58 is_ a b = do 51 59 cool <- ok (a == b) … … 55 63 else return () 56 64 65 ok :: Bool -> IO Bool 57 66 ok x = do 58 t <- newTest67 tst <- newTest 59 68 if x 60 then putStrLn ("ok " ++ (show t )) >> return True61 else putStrLn ("not ok " ++ (show t )) >> return False69 then putStrLn ("ok " ++ (show tst)) >> return True 70 else putStrLn ("not ok " ++ (show tst)) >> return False 62 71 72 check :: [Bool] -> IO () 63 73 check l = do 64 74 mapM_ ok l -
third-party/HsJudy/tests/TestBS.hs
r12103 r20086 1 {-# OPTIONS -fallow-overlapping-instances #-}1 {-# LANGUAGE OverlappingInstances #-} 2 2 3 3 import Test … … 7 7 import Judy.Freeze 8 8 9 main :: IO () 9 10 main = no_plan $ do 10 11 testIntSimple … … 43 44 s <- newIntSet 44 45 BS.get s 2 .=> False 45 46 46 47 BS.set s 1 True 47 48 BS.get s 1 .=> True 48 49 49 50 BS.set s 2 True 50 51 BS.get s 2 .=> True 51 52 52 53 BS.set s 1 False 53 54 BS.get s 1 .=> False 54 55 55 56 BS.clear s 56 57 BS.get s 1 .=> False … … 107 108 BS.toList s .-= [] 108 109 109 BS.insert 1 s 110 BS.insert 1 s 110 111 BS.insert 2 s 111 112 BS.insert 42 s … … 114 115 BS.insert 1 s 115 116 BS.toList s .-= [1, 2, 42] 116 117 117 118 BS.delete 1 s 118 119 BS.delete 2 s 119 120 BS.toList s .-= [42] 120 121 121 122 BS.delete 1 s 122 123 BS.toList s .-= [42] … … 167 168 unHashIO 10 = return A 168 169 unHashIO 20 = return B 169 unHashIO 30 = return C 170 unHashIO 30 = return C 170 171 unHashIO 40 = return D 171 172 -
third-party/HsJudy/tests/atom/PackedString.hs
r11676 r20086 1 {-# OPTIONS_GHC -ffi#-}1 {-# LANGUAGE ForeignFunctionInterface #-} 2 2 ----------------------------------------------------------------------------- 3 3 -- |
