Changeset 20086 for third-party

Show
Ignore:
Timestamp:
03/08/08 00:28:00 (10 months ago)
Author:
gwern
Message:

Update HsJudy? to build against the system's installation of Judy and not the version taking up space in thirdparty/

Location:
third-party/HsJudy
Files:
14 modified

Legend:

Unmodified
Added
Removed
  • third-party/HsJudy/HsJudy.cabal

    r19958 r20086  
    11name:                HsJudy 
    2 version:             0.1 
     2version:             0.1.1 
    33Category:            Data 
    44Synopsis:            Judy bindings, and some nice APIs 
     
    3232                             Judy.CollectionsM Judy.HashIO Judy.Refeable Judy.Stringable 
    3333        other-modules:       Judy.Private Judy.MiniGC 
     34        extra-libraries:     Judy 
    3435 
    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 #-} 
    22 
    33{-# INCLUDE "Judy.h" #-} 
  • third-party/HsJudy/Judy/CollectionsM.hs

    r19958 r20086  
    1 {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-} 
     1{-# LANGUAGE UndecidableInstances, FunctionalDependencies, FlexibleContexts #-} 
    22 
    33module Judy.CollectionsM ( 
  • third-party/HsJudy/Judy/Hash.hs

    r19958 r20086  
    1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-} 
     1{-# LANGUAGE MultiParamTypeClasses, UndecidableInstances, IncoherentInstances #-} 
    22 
    33{-# 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 #-} 
    33 
    44module Judy.HashIO ( 
     
    2020    -- Two step conversion, first from Value -> Int then Int -> a 
    2121    unHashIO :: Value -> IO a 
    22  
    2322 
    2423instance 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 #-} 
    22 
    33{-# INCLUDE "Judy.h" #-} 
  • third-party/HsJudy/Judy/MiniGC.hs

    r19958 r20086  
    1  
     1{-# LANGUAGE DeriveDataTypeable #-} 
    22{-# INCLUDE "Judy.h" #-} 
    33 
  • third-party/HsJudy/Judy/Private.hsc

    r19958 r20086  
     1{-# LANGUAGE ForeignFunctionInterface #-} 
     2 
    13-- | Low-level FFI 
    24module Judy.Private where 
     
    57 
    68#if __GLASGOW_HASKELL__ >= 605 
    7 import Data.Word 
     9-- import Data.Word 
    810#else 
    911import 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  #-} 
    32module Judy.Refeable ( 
    43    Refeable (..) 
    54) where 
    6  
    7  
    85 
    96import Foreign.StablePtr 
  • third-party/HsJudy/Judy/StrMap.hs

    r19958 r20086  
    1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-} 
     1{-# LANGUAGE UndecidableInstances, IncoherentInstances #-} 
    22 
    33{-# INCLUDE "Judy.h" #-} 
  • third-party/HsJudy/Judy/Stringable.hs

    r19958 r20086  
    1 {-# OPTIONS -fglasgow-exts #-} 
    21{-# LANGUAGE TypeSynonymInstances #-} 
    32 
  • third-party/HsJudy/tests/Test.hs

    r11899 r20086  
    1818 
    1919 
     20no_plan :: IO t -> IO () 
    2021no_plan test = do 
    2122    test 
     
    2324    putStrLn $ "1.." ++ (show total) 
    2425 
     26t :: String -> IO b -> IO b 
    2527t name test = say name >> test 
    2628 
     
    2830plan = putStrLn . ("1.." ++) . show 
    2931 
     32diag :: String -> IO () 
    3033diag = (hPutStrLn stderr) . ("# " ++) 
    3134 
    3235-- Not best name, but a three char name.. 
     36say :: String -> IO () 
    3337say = putStrLn . ("# " ++) 
    3438 
    3539infix 0 .=>, ==>, =-=, .-= 
    3640 
    37  
     41(.=>) :: (Eq t, Show t) => IO t -> t -> IO () 
    3842(.=>) act v = do 
    3943    x <- act 
    4044    is_ x v 
    4145 
     46(==>) :: (Eq a, Show a) => a -> a -> IO () 
    4247(==>) a b = is_ a b 
    4348 
     49(.-=) :: (Show a, Ord a) => IO [a] -> [a] -> IO () 
    4450(.-=) act l = do 
    4551    x <- act 
    4652    is_ (sort x) (sort l) 
    4753 
     54(=-=) :: (Show a, Ord a) => [a] -> [a] -> IO () 
    4855(=-=) a b = is_ (sort a) (sort b) 
    4956 
     57is_ :: (Show a, Eq a) => a -> a -> IO () 
    5058is_ a b = do 
    5159    cool <- ok (a == b) 
     
    5563        else return () 
    5664 
     65ok :: Bool -> IO Bool 
    5766ok x = do 
    58         t <- newTest 
     67        tst <- newTest 
    5968        if x 
    60             then putStrLn ("ok " ++ (show t)) >> return True 
    61             else putStrLn ("not ok " ++ (show t)) >> return False 
     69            then putStrLn ("ok " ++ (show tst)) >> return True 
     70            else putStrLn ("not ok " ++ (show tst)) >> return False 
    6271 
     72check :: [Bool] -> IO () 
    6373check l = do 
    6474    mapM_ ok l 
  • third-party/HsJudy/tests/TestBS.hs

    r12103 r20086  
    1 {-# OPTIONS -fallow-overlapping-instances #-} 
     1{-# LANGUAGE OverlappingInstances #-} 
    22 
    33import Test 
     
    77import Judy.Freeze 
    88 
     9main :: IO () 
    910main = no_plan $ do 
    1011    testIntSimple 
     
    4344    s <- newIntSet 
    4445    BS.get s 2 .=> False 
    45      
     46 
    4647    BS.set s 1 True 
    4748    BS.get s 1 .=> True 
    48      
     49 
    4950    BS.set s 2 True 
    5051    BS.get s 2 .=> True 
    51      
     52 
    5253    BS.set s 1 False 
    5354    BS.get s 1 .=> False 
    54      
     55 
    5556    BS.clear s 
    5657    BS.get s 1 .=> False 
     
    107108    BS.toList s .-= [] 
    108109 
    109     BS.insert 1 s  
     110    BS.insert 1 s 
    110111    BS.insert 2 s 
    111112    BS.insert 42 s 
     
    114115    BS.insert 1 s 
    115116    BS.toList s .-= [1, 2, 42] 
    116      
     117 
    117118    BS.delete 1 s 
    118119    BS.delete 2 s 
    119120    BS.toList s .-= [42] 
    120      
     121 
    121122    BS.delete 1 s 
    122123    BS.toList s .-= [42] 
     
    167168    unHashIO 10 = return A 
    168169    unHashIO 20 = return B 
    169     unHashIO 30 = return C  
     170    unHashIO 30 = return C 
    170171    unHashIO 40 = return D 
    171172 
  • third-party/HsJudy/tests/atom/PackedString.hs

    r11676 r20086  
    1 {-# OPTIONS_GHC -ffi #-} 
     1{-# LANGUAGE ForeignFunctionInterface #-} 
    22----------------------------------------------------------------------------- 
    33-- |