packages feed

pugs-compat 0.0.6.2 → 0.0.6.20110925

raw patch · 3 files changed

+2/−19 lines, 3 filesdep −haskell98PVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: haskell98

API changes (from Hackage documentation)

- Pugs.Compat: instance [overlap ok] Typeable1 [::]

Files

pugs-compat.cabal view
@@ -1,5 +1,5 @@ Name           : pugs-compat-Version        : 0.0.6.2+Version        : 0.0.6.20110925 Build-type     : Simple Category       : Pugs License        : BSD3@@ -16,7 +16,7 @@                     TypeSynonymInstances, FlexibleInstances, PatternGuards,                     UndecidableInstances, FlexibleContexts, OverlappingInstances, TypeOperators -  Build-depends   : base >=4 && < 5, haskell98, time, directory, process, regex-pcre-builtin, regex-base,+  Build-depends   : base >=4 && < 5, time, directory, process, regex-pcre-builtin, regex-base,                     random, network, containers, bytestring, array, mtl < 2.0.0.0, stm, utf8-string, syb,                     stringtable-atom >= 0.0.6.1   Exposed-modules : Pugs.Compat
src/Pugs/Compat.hs view
@@ -1,5 +1,4 @@ {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-orphans #-}-{-# LANGUAGE PArr #-} {-|     Internal utilities and library imports. @@ -59,7 +58,6 @@ import Debug.Trace            as X  import GHC.Conc               as X (unsafeIOToSTM) import GHC.Exts               as X (unsafeCoerce#, Word(W#), Word#)-import GHC.PArr               as X  import Network                as X  import Numeric                as X (showHex) import System.Cmd             as X @@ -93,6 +91,3 @@     x == y = show x == show y instance Ord Dynamic where     compare x y = compare (show x) (show y)--instance Typeable1 [::] where-    typeOf1 _ = mkTyConApp (mkTyCon "[::]") []
src/Pugs/Compat/Cast.hs view
@@ -1,5 +1,4 @@ {-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# LANGUAGE PArr #-} module Pugs.Compat.Cast (     (:>:)(..),     (:<:)(..),@@ -15,7 +14,6 @@ import Data.Sequence (Seq) import Numeric (showHex) import Data.Foldable (toList)-import GHC.PArr (fromP, toP, mapP) import qualified Data.Sequence as Seq import qualified Data.Typeable as Typeable import qualified Data.ByteString.UTF8 as UTF8@@ -29,11 +27,6 @@ -- Also, it must work for all values of type "b". --  class ((:>:) a) b where-    {-# SPECIALISE cast :: a -> a #-}-    {-# SPECIALISE cast :: ByteString -> ByteString #-}-    {-# SPECIALISE cast :: String -> ByteString #-}-    {-# SPECIALISE cast :: ByteString -> String #-}-    {-# SPECIALISE cast :: String -> String #-}     cast :: b -> a  class ((:<:) a) b where@@ -43,8 +36,6 @@     cast = castBack  {-# INLINE _cast #-}-{-# SPECIALISE _cast :: String -> String #-}-{-# SPECIALISE _cast :: String -> ByteString #-} _cast :: (a :>: String) => String -> a _cast = cast @@ -52,12 +43,9 @@  instance ((:>:) [a]) (Seq a) where cast = toList instance ((:<:) [a]) (Seq a) where castBack = Seq.fromList-instance ((:>:) [a]) [:a:] where cast = fromP-instance ((:<:) [a]) [:a:] where castBack = toP  -- "map cast" can be written as "cast" instance (a :>: b) => ((:>:) [a]) [b] where cast = map cast-instance (a :>: b) => ((:>:) [:a:]) [:b:] where cast = mapP cast  fromTypeable :: forall m a b. (Monad m, Typeable a, Typeable b) => a -> m b fromTypeable x = case Typeable.cast x of