Safe Haskell | None |
---|
- data Indexed a i1 i2 i3 i4 i5 i6
- create1 :: (Eq a, Eq i1, Hashable i1) => (a -> i1) -> Indexed a i1 () () () () ()
- create2 :: (a -> i1) -> (a -> i2) -> Indexed a i1 i2 i3 i4 i5 i6
- create3 :: (a -> i1) -> (a -> i2) -> (a -> i3) -> Indexed a i1 i2 i3 () () ()
- create4 :: (a -> i1) -> (a -> i2) -> (a -> i3) -> (a -> i4) -> Indexed a i1 i2 i3 i4 () ()
- create5 :: (a -> i1) -> (a -> i2) -> (a -> i3) -> (a -> i4) -> (a -> i5) -> Indexed a i1 i2 i3 i4 i5 ()
- create6 :: (a -> i1) -> (a -> i2) -> (a -> i3) -> (a -> i4) -> (a -> i5) -> (a -> i6) -> Indexed a i1 i2 i3 i4 i5 i6
- class SimpleIx a where
- ixInsert :: (Eq k4, Eq k3, Eq k2, Eq k1, Eq k, Eq i6, Hashable k4, Hashable k3, Hashable k2, Hashable k1, Hashable k, Hashable i6) => Indexed a k4 k3 k2 k1 k i6 -> a -> Indexed a k4 k3 k2 k1 k i6
- ixDelete :: (Eq a, Eq k, Eq i2, Eq i3, Eq i4, Eq i5, Eq i6, Hashable k, Hashable i2, Hashable i3, Hashable i4, Hashable i5, Hashable i6) => Indexed a k i2 i3 i4 i5 i6 -> a -> Indexed a k i2 i3 i4 i5 i6
- ixUpdate :: (Eq k, Eq i2, Eq i3, Eq i4, Eq i5, Eq i6, Hashable k, Hashable i2, Hashable i3, Hashable i4, Hashable i5, Hashable i6) => Indexed a k i2 i3 i4 i5 i6 -> k -> (a -> a) -> Maybe (Int, a, a, Indexed a k i2 i3 i4 i5 i6)
- ixRead1 :: (Eq b, Hashable b) => b -> Indexed a b t2 t3 t4 t5 t6 -> Maybe a
- ixRead2 :: (Eq b, Hashable b) => b -> Indexed a t1 b t3 t4 t5 t6 -> Maybe a
- ixRead3 :: (Eq b, Hashable b) => b -> Indexed a t1 t2 b t4 t5 t6 -> Maybe a
- ixRead4 :: (Eq b, Hashable b) => b -> Indexed a t1 t2 t3 b t5 t6 -> Maybe a
- ixRead5 :: (Eq b, Hashable b) => b -> Indexed a t1 t2 t3 t4 b t6 -> Maybe a
- ixRead6 :: (Eq b, Hashable b) => b -> Indexed a t1 t2 t3 t4 t5 b -> Maybe a
The Data Type to use
Creation functions
:: (Eq a, Eq i1, Hashable i1) | |
=> (a -> i1) | The function that returns the index for the base datatype |
-> Indexed a i1 () () () () () |
Use this function to create an Indexed data type with only 1 index for your type
create2 :: (a -> i1) -> (a -> i2) -> Indexed a i1 i2 i3 i4 i5 i6Source
Create an Indexed data type with 2 indexes for your type create2 :: forall a i1 i2 i3 i4 i5 i6. (Eq i1, Eq i2, Eq i3, Eq i4, Eq i5, Eq i6, Hashable i1, Hashable i2, Hashable i3, Hashable i4, Hashable i5, Hashable i6, SafeCopy a) => (a -> i1) -- ^ The function that returns the first index for your datatype -> (a -> i2) -- ^ The function that returns the second index for your datatype -> Indexed a i1 i2 i3 i4 i5 i6
:: (a -> i1) | The function that returns the first index for your datatype |
-> (a -> i2) | The function that returns the second index for your datatype |
-> (a -> i3) | The function that returns the third index for your datatype |
-> Indexed a i1 i2 i3 () () () |
Create an Indexed data type with 3 indexes for your type
:: (a -> i1) | The function that returns the first index for your datatype |
-> (a -> i2) | The function that returns the second index for your datatype |
-> (a -> i3) | The function that returns the third index for your datatype |
-> (a -> i4) | The function that returns the fourth index for your datatype |
-> Indexed a i1 i2 i3 i4 () () |
Create an Indexed data type with 4 indexes for your type
:: (a -> i1) | The function that returns the first index for your datatype |
-> (a -> i2) | The function that returns the second index for your datatype |
-> (a -> i3) | The function that returns the third index for your datatype |
-> (a -> i4) | The function that returns the fourth index for your datatype |
-> (a -> i5) | The function that returns the fifth index for your datatype |
-> Indexed a i1 i2 i3 i4 i5 () |
Create an Indexed data type with 5 indexes for your type
:: (a -> i1) | The function that returns the first index for your datatype |
-> (a -> i2) | The function that returns the second index for your datatype |
-> (a -> i3) | The function that returns the third index for your datatype |
-> (a -> i4) | The function that returns the fourth index for your datatype |
-> (a -> i5) | The function that returns the fifth index for your datatype |
-> (a -> i6) | The function that returns the sixth index for your datatype |
-> Indexed a i1 i2 i3 i4 i5 i6 |
Create an Indexed data type with 6 indexes for your type
Fill this type class to make your type indexable
Insert, Delete, Update and Read
ixInsert :: (Eq k4, Eq k3, Eq k2, Eq k1, Eq k, Eq i6, Hashable k4, Hashable k3, Hashable k2, Hashable k1, Hashable k, Hashable i6) => Indexed a k4 k3 k2 k1 k i6 -> a -> Indexed a k4 k3 k2 k1 k i6Source
Inserts a new value into the Indexed data type and updates all the information in the indexes
ixDelete :: (Eq a, Eq k, Eq i2, Eq i3, Eq i4, Eq i5, Eq i6, Hashable k, Hashable i2, Hashable i3, Hashable i4, Hashable i5, Hashable i6) => Indexed a k i2 i3 i4 i5 i6 -> a -> Indexed a k i2 i3 i4 i5 i6Source
Deletes a value from the Indexed data type and updates all the information in the indexes
ixUpdate :: (Eq k, Eq i2, Eq i3, Eq i4, Eq i5, Eq i6, Hashable k, Hashable i2, Hashable i3, Hashable i4, Hashable i5, Hashable i6) => Indexed a k i2 i3 i4 i5 i6 -> k -> (a -> a) -> Maybe (Int, a, a, Indexed a k i2 i3 i4 i5 i6)Source
Updates a value in the Indexed data type and all the information in the indexes
ixRead1 :: (Eq b, Hashable b) => b -> Indexed a b t2 t3 t4 t5 t6 -> Maybe aSource
Reads your datatype from the Indexed data by looking up a first index value
ixRead2 :: (Eq b, Hashable b) => b -> Indexed a t1 b t3 t4 t5 t6 -> Maybe aSource
Reads your datatype from the Indexed data by looking up a value on the second index
ixRead3 :: (Eq b, Hashable b) => b -> Indexed a t1 t2 b t4 t5 t6 -> Maybe aSource
Reads your datatype from the Indexed data by looking up a value on the third index
ixRead4 :: (Eq b, Hashable b) => b -> Indexed a t1 t2 t3 b t5 t6 -> Maybe aSource
Reads your datatype from the Indexed data by looking up a value on the fourth index