summaryrefslogtreecommitdiff
path: root/testsuite/tests/backpack/should_run/bkprun06.bkp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/backpack/should_run/bkprun06.bkp')
-rw-r--r--testsuite/tests/backpack/should_run/bkprun06.bkp164
1 files changed, 164 insertions, 0 deletions
diff --git a/testsuite/tests/backpack/should_run/bkprun06.bkp b/testsuite/tests/backpack/should_run/bkprun06.bkp
new file mode 100644
index 0000000000..596fa897bc
--- /dev/null
+++ b/testsuite/tests/backpack/should_run/bkprun06.bkp
@@ -0,0 +1,164 @@
+{-# LANGUAGE RoleAnnotations #-}
+unit sigs where
+ signature Map where
+ import Data.Typeable
+ import Data.Data
+ import Data.Traversable
+ import Data.Foldable
+ import Data.Monoid
+ import Control.DeepSeq
+ import Control.Applicative
+
+ infixl 9 !,\\
+
+ type role Map nominal representational
+ data Map k a
+
+ instance Functor (Map k)
+ instance Foldable (Map k)
+ instance Traversable (Map k)
+ instance (Eq k, Eq a) => Eq (Map k a)
+ instance (Data k, Data a, Ord k) => Data (Map k a)
+ instance (Ord k, Ord v) => Ord (Map k v)
+ instance (Ord k, Read k, Read e) => Read (Map k e)
+ instance (Show k, Show a) => Show (Map k a)
+ instance Ord k => Monoid (Map k v)
+ instance (NFData k, NFData a) => NFData (Map k a)
+
+ (!) :: Ord k => Map k a -> k -> a
+ (\\) :: Ord k => Map k a -> Map k b -> Map k a
+ null :: Map k a -> Bool
+ size :: Map k a -> Int
+ member :: Ord k => k -> Map k a -> Bool
+ notMember :: Ord k => k -> Map k a -> Bool
+ lookup :: Ord k => k -> Map k a -> Maybe a
+ findWithDefault :: Ord k => a -> k -> Map k a -> a
+ lookupLT :: Ord k => k -> Map k v -> Maybe (k, v)
+ lookupGT :: Ord k => k -> Map k v -> Maybe (k, v)
+ lookupLE :: Ord k => k -> Map k v -> Maybe (k, v)
+ lookupGE :: Ord k => k -> Map k v -> Maybe (k, v)
+ empty :: Map k a
+ singleton :: k -> a -> Map k a
+ insert :: Ord k => k -> a -> Map k a -> Map k a
+ insertWith :: Ord k => (a -> a -> a) -> k -> a -> Map k a -> Map k a
+ insertWithKey :: Ord k => (k -> a -> a -> a) -> k -> a -> Map k a -> Map k a
+ insertLookupWithKey :: Ord k => (k -> a -> a -> a) -> k -> a -> Map k a -> (Maybe a, Map k a)
+ delete :: Ord k => k -> Map k a -> Map k a
+ adjust :: Ord k => (a -> a) -> k -> Map k a -> Map k a
+ adjustWithKey :: Ord k => (k -> a -> a) -> k -> Map k a -> Map k a
+ update :: Ord k => (a -> Maybe a) -> k -> Map k a -> Map k a
+ updateWithKey :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> Map k a
+ updateLookupWithKey :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> (Maybe a, Map k a)
+ alter :: Ord k => (Maybe a -> Maybe a) -> k -> Map k a -> Map k a
+ union :: Ord k => Map k a -> Map k a -> Map k a
+ unionWith :: Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
+ unionWithKey :: Ord k => (k -> a -> a -> a) -> Map k a -> Map k a -> Map k a
+ unions :: Ord k => [Map k a] -> Map k a
+ unionsWith :: Ord k => (a -> a -> a) -> [Map k a] -> Map k a
+ difference :: Ord k => Map k a -> Map k b -> Map k a
+ differenceWith :: Ord k => (a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
+ differenceWithKey :: Ord k => (k -> a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
+ intersection :: Ord k => Map k a -> Map k b -> Map k a
+ intersectionWith :: Ord k => (a -> b -> c) -> Map k a -> Map k b -> Map k c
+ intersectionWithKey :: Ord k => (k -> a -> b -> c) -> Map k a -> Map k b -> Map k c
+ mergeWithKey :: Ord k => (k -> a -> b -> Maybe c) -> (Map k a -> Map k c) -> (Map k b -> Map k c) -> Map k a -> Map k b -> Map k c
+ map :: (a -> b) -> Map k a -> Map k b
+ mapWithKey :: (k -> a -> b) -> Map k a -> Map k b
+ traverseWithKey :: Applicative t => (k -> a -> t b) -> Map k a -> t (Map k b)
+ mapAccum :: (a -> b -> (a, c)) -> a -> Map k b -> (a, Map k c)
+ mapAccumWithKey :: (a -> k -> b -> (a, c)) -> a -> Map k b -> (a, Map k c)
+ mapAccumRWithKey :: (a -> k -> b -> (a, c)) -> a -> Map k b -> (a, Map k c)
+ mapKeys :: Ord k2 => (k1 -> k2) -> Map k1 a -> Map k2 a
+ mapKeysWith :: Ord k2 => (a -> a -> a) -> (k1 -> k2) -> Map k1 a -> Map k2 a
+ mapKeysMonotonic :: (k1 -> k2) -> Map k1 a -> Map k2 a
+ foldr :: (a -> b -> b) -> b -> Map k a -> b
+ foldl :: (a -> b -> a) -> a -> Map k b -> a
+ foldrWithKey :: (k -> a -> b -> b) -> b -> Map k a -> b
+ foldlWithKey :: (a -> k -> b -> a) -> a -> Map k b -> a
+ foldMapWithKey :: Monoid m => (k -> a -> m) -> Map k a -> m
+ foldr' :: (a -> b -> b) -> b -> Map k a -> b
+ foldl' :: (a -> b -> a) -> a -> Map k b -> a
+ foldrWithKey' :: (k -> a -> b -> b) -> b -> Map k a -> b
+ foldlWithKey' :: (a -> k -> b -> a) -> a -> Map k b -> a
+ elems :: Map k a -> [a]
+ keys :: Map k a -> [k]
+ assocs :: Map k a -> [(k, a)]
+ toList :: Map k a -> [(k, a)]
+ fromList :: Ord k => [(k, a)] -> Map k a
+ fromListWith :: Ord k => (a -> a -> a) -> [(k, a)] -> Map k a
+ fromListWithKey :: Ord k => (k -> a -> a -> a) -> [(k, a)] -> Map k a
+ toAscList :: Map k a -> [(k, a)]
+ toDescList :: Map k a -> [(k, a)]
+ fromAscList :: Eq k => [(k, a)] -> Map k a
+ fromAscListWith :: Eq k => (a -> a -> a) -> [(k, a)] -> Map k a
+ fromAscListWithKey :: Eq k => (k -> a -> a -> a) -> [(k, a)] -> Map k a
+ fromDistinctAscList :: [(k, a)] -> Map k a
+ filter :: (a -> Bool) -> Map k a -> Map k a
+ filterWithKey :: (k -> a -> Bool) -> Map k a -> Map k a
+ partition :: (a -> Bool) -> Map k a -> (Map k a, Map k a)
+ partitionWithKey :: (k -> a -> Bool) -> Map k a -> (Map k a, Map k a)
+ mapMaybe :: (a -> Maybe b) -> Map k a -> Map k b
+ mapMaybeWithKey :: (k -> a -> Maybe b) -> Map k a -> Map k b
+ mapEither :: (a -> Either b c) -> Map k a -> (Map k b, Map k c)
+ mapEitherWithKey :: (k -> a -> Either b c) -> Map k a -> (Map k b, Map k c)
+ split :: Ord k => k -> Map k a -> (Map k a, Map k a)
+ splitLookup :: Ord k => k -> Map k a -> (Map k a, Maybe a, Map k a)
+ splitRoot :: Map k b -> [Map k b]
+ isSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool
+ isSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool
+ isProperSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool
+ isProperSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool
+ lookupIndex :: Ord k => k -> Map k a -> Maybe Int
+ findIndex :: Ord k => k -> Map k a -> Int
+ elemAt :: Int -> Map k a -> (k, a)
+ updateAt :: (k -> a -> Maybe a) -> Int -> Map k a -> Map k a
+ deleteAt :: Int -> Map k a -> Map k a
+ findMin :: Map k a -> (k, a)
+ findMax :: Map k a -> (k, a)
+ deleteMin :: Map k a -> Map k a
+ deleteMax :: Map k a -> Map k a
+ deleteFindMin :: Map k a -> ((k, a), Map k a)
+ deleteFindMax :: Map k a -> ((k, a), Map k a)
+ updateMin :: (a -> Maybe a) -> Map k a -> Map k a
+ updateMax :: (a -> Maybe a) -> Map k a -> Map k a
+ updateMinWithKey :: (k -> a -> Maybe a) -> Map k a -> Map k a
+ updateMaxWithKey :: (k -> a -> Maybe a) -> Map k a -> Map k a
+ minView :: Map k a -> Maybe (a, Map k a)
+ maxView :: Map k a -> Maybe (a, Map k a)
+ minViewWithKey :: Map k a -> Maybe ((k, a), Map k a)
+ maxViewWithKey :: Map k a -> Maybe ((k, a), Map k a)
+ showTree :: (Show k, Show a) => Map k a -> String
+ showTreeWith :: (k -> a -> String) -> Bool -> Bool -> Map k a -> String
+ valid :: Ord k => Map k a -> Bool
+
+ signature MapAsSet where
+ import Data.Set
+
+ type role Map nominal representational
+ data Map k a
+ instance Functor (Map k)
+
+ keysSet :: Map k a -> Set k
+ fromSet :: (k -> a) -> Set k -> Map k a
+
+unit app where
+ dependency sigs[Map=<Map>, MapAsSet=<Map>]
+ module App where
+ import Map
+
+ app = do
+ let x = insert 0 "foo"
+ . delete 1
+ . insert 1 undefined
+ . insert (6 :: Int) "foo"
+ $ empty
+ print (member 1 x)
+ print (keysSet x)
+ print (toList x)
+ print x
+
+unit main where
+ dependency app[Map=containers:Data.Map.Lazy]
+ module Main where
+ import App
+ main = app