Changeset 12103 for third-party

Show
Ignore:
Timestamp:
08/11/06 08:01:36 (2 years ago)
Author:
cmarcelo
Message:

* HsJudy?: Correcting my rev control mistakes =P

Location:
third-party/HsJudy
Files:
1 added
12 modified

Legend:

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

    r12102 r12103  
    66author:              Caio Marcelo de Oliveira Filho <cmarcelo@gmail.com>, John Meacham 
    77maintainer:          Caio Marcelo de Oliveira Filho <cmarcelo@gmail.com> 
    8 build-depends:       base -any, pugs-fps -any 
     8build-depends:       base 
    99exposed-modules:     Judy.BitSet Judy.Freeze Judy.Hash Judy.IntMap Judy.StrMap Judy.CollectionsM Judy.HashIO Judy.Refeable Judy.Stringable 
    1010other-modules:       Judy.Private Judy.MiniGC 
    1111extensions:          ForeignFunctionInterface 
    12 ghc-options:         -fglasgow-exts -O2 -static 
     12ghc-options:         -fglasgow-exts -O2 
    1313include-dirs:        . ../judy/Judy-1.0.3/src 
    1414-- FIXME: make Cabal work nicely with _hsc files, now I think it works, but doesnt clean _hsc files 
    1515c-sources:           Judy/Private_hsc.c 
    1616extra-libraries:     Judy 
    17 extra-lib-dirs:      . 
  • third-party/HsJudy/Judy/Hash.hs

    r12024 r12103  
    7070        mapM_ GC.freeRef es 
    7171    v <- judyHSFreeArray j judyError 
    72     putStrLn $ "\n(FINALIZER CALLED FOR "++ (show j) ++  ": " ++ (show v) ++ ")\n" 
     72    --putStrLn $ "\n(FINALIZER CALLED FOR "++ (show j) ++  ": " ++ (show v) ++ ")\n" 
    7373    return () 
    7474 
     
    168168newIter = do 
    169169    fp <- mallocForeignPtr 
    170 --    addForeignPtrFinalizer judyHSIter_free_ptr fp 
     170    addForeignPtrFinalizer judyHSIter_free_ptr fp 
    171171    withForeignPtr fp $ flip poke nullPtr 
    172172    return $ HashIter fp 
  • third-party/HsJudy/Judy/HashIO.hs

    r10844 r12103  
    1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-} 
     1{-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances -fallow-overlapping-instances #-} 
    22 
    33module Judy.HashIO ( 
  • third-party/HsJudy/Judy/Private.hsc

    r11639 r12103  
    33 
    44import Foreign 
     5 
     6#if __GLASGOW_HASKELL__ >= 605 
    57import Data.Word 
     8#else 
     9--import Judy.Word 
     10import GHC.Exts 
     11#endif 
     12 
    613import Foreign.C.Types 
    714import Foreign.C.String 
     
    1118 
    1219--type Value = (#type Word_t) 
     20--type Value = CULong 
     21 
     22#if __GLASGOW_HASKELL__ >= 605 
    1323type Value = WordPtr 
    14 --type Value = CULong 
     24#else 
     25type Value = (#type Word_t) 
     26 
     27ptrToWordPtr :: Ptr () -> Value 
     28ptrToWordPtr = unsafeCoerce## 
     29 
     30wordPtrToPtr :: Value -> Ptr () 
     31wordPtrToPtr = unsafeCoerce## 
     32 
     33#endif 
    1534 
    1635newtype JError = JError (Ptr ()) 
  • third-party/HsJudy/Judy/Stringable.hs

    r12102 r12103  
    66 
    77import Foreign.C.String 
    8  
    9 -- #if __GLASGOW_HASKELL__ >= 605 
    108import qualified Data.ByteString as B 
    11 -- #endif 
    129 
    1310-- TODO: See if its possible to use Storable, ie. to let any Storable type be "stringable". 
     
    3128    fromString = id 
    3229 
    33 -- #if __GLASGOW_HASKELL__ >= 605 
    3430instance Stringable B.ByteString where 
    35      toString = undefined 
    36      fromString = undefined 
     31    toString = undefined 
     32    fromString = undefined 
    3733  
    38      useAsCS = B.useAsCString  
    39      useAsCSLen = B.useAsCStringLen 
    40   
    41      copyCS = B.copyCString 
    42      copyCSLen = B.copyCStringLen 
    43 -- #endif 
     34    useAsCS = B.useAsCString  
     35    useAsCSLen = B.useAsCStringLen 
    4436 
     37    copyCS = B.copyCString 
     38    copyCSLen = B.copyCStringLen 
    4539 
    4640--instance Stringable Int where 
  • third-party/HsJudy/Makefile

    r12024 r12103  
    11#GHC=ghc-6.4.2  
    22GHC=ghc # -debug 
     3 
    34CC=$(GHC) 
    45TESTS=TestBS TestJL TestJSL TestJHS TestHash TestIntMap TestStrMap 
     6#HSC2HS=/usr/bin/hsc2hs 
     7HSC2HS=hsc2hs 
     8 
    59 
    610CFLAGS= -O2 
    7  
    8 JUDY_SRC=../judy/Judy-1.0.3 
    9  
    10  
    1111LIB_JUDY=-lJudy 
    12  
    13 # static linking 
    14 #LIB_JUDY=$(JUDY_SRC)/src/Judy1/*.o $(JUDY_SRC)/src/JudyL/*.o $(JUDY_SRC)/src/JudySL/*.o $(JUDY_SRC)/src/JudyHS/*.o $(JUDY_SRC)/src/JudyCommon/*.o 
    15   
    1612 
    1713CHEADERS= Judy/Private_hsc.h 
    1814HSFLAGS= $(HSF) -O2 -fffi -I/usr/local/include -fglasgow-exts -I. '-\#include Judy/Private_hsc.h' $(LIB_JUDY) 
     15 
    1916 
    2017%.hi: %.o 
     
    2623 
    2724%.hs: %.hsc 
    28         hsc2hs -C "-I/usr/local/include" -C "$(CFLAGS)" -o $@ $< 
     25        $(HSC2HS) -C "-I/usr/local/include" -C "-I$(JUDY_SRC)/src" -C "$(CFLAGS)" -o $@ $< 
    2926 
    3027all: $(TESTS) 
  • third-party/HsJudy/TODO

    r11831 r12103  
    11# TODO 
    2 - Use Judy for Hash and Array in Pugs. Maybe creating some special 
    3   operators for Judy.Map2 to be used for Array (think shift and pop). 
    42- CollectionsM: complete the subset of MapM and uncomment/complete CollectionM. 
    53- See if needGC hack can be improved. It seems its eating CPU time. 
     
    108 
    119- Names names names 
    12   - Idea: Map2 -> IntMap 
    13   - Should I call MapSL just Map too? 
     10  - HashIO is too similar to Hash. Stringable is strange and not totally true, 
     11    maybe CStringable? 
    1412 
    1513- Other missing malloc error checking 
  • third-party/HsJudy/tests/CheckDup.hs

    r12102 r12103  
    1 {-# OPTIONS -fallow-overlapping-instances #-} 
    2  
    31import qualified Judy.Hash as H 
    42import qualified Judy.StrMap as S 
  • third-party/HsJudy/tests/TestBS.hs

    r11694 r12103  
     1{-# OPTIONS -fallow-overlapping-instances #-} 
     2 
    13import Test 
    24 
  • third-party/HsJudy/tests/TestHash.hs

    r12024 r12103  
    1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-} 
     1{-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances -fallow-overlapping-instances #-} 
    22 
    33import Test 
  • third-party/HsJudy/tests/TestIntMap.hs

    r12024 r12103  
    1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-} 
     1{-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances -fallow-overlapping-instances #-} 
    22 
    33import Test 
  • third-party/HsJudy/tests/TestStrMap.hs

    r12024 r12103  
    1 {-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances #-} 
     1{-# OPTIONS -fallow-undecidable-instances -fallow-incoherent-instances -fallow-overlapping-instances #-} 
    22 
    33import Test