packages feed

copilot-language 3.10 → 3.11

raw patch · 7 files changed

+29/−22 lines, 7 filesdep +copilot-interpreterdep ~copilot-coredep ~copilot-theoremPVP ok

version bump matches the API change (PVP)

Dependencies added: copilot-interpreter

Dependency ranges changed: copilot-core, copilot-theorem

API changes (from Hackage documentation)

- Copilot.Language.Operators.BitWise: instance (Copilot.Core.Type.Typed a, Data.Bits.Bits a) => Data.Bits.Bits (Copilot.Language.Stream.Stream a)
+ Copilot.Language.Operators.BitWise: instance (Copilot.Core.Type.Typed a, GHC.Bits.Bits a) => GHC.Bits.Bits (Copilot.Language.Stream.Stream a)
- Copilot.Language.Operators.Array: (.!!) :: (KnownNat n, t' ~ InnerType t, Flatten t t', Typed t, Typed t') => Stream (Array n t) -> Stream Word32 -> Stream t
+ Copilot.Language.Operators.Array: (.!!) :: (KnownNat n, Typed t) => Stream (Array n t) -> Stream Word32 -> Stream t
- Copilot.Language.Prelude: class Foldable (t :: Type -> Type)
+ Copilot.Language.Prelude: class Foldable (t :: TYPE LiftedRep -> Type)
- Copilot.Language.Prelude: infixl 6 +
+ Copilot.Language.Prelude: infixl 6 -
- Copilot.Language.Prelude: seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b
+ Copilot.Language.Prelude: seq :: forall {r :: RuntimeRep} a (b :: TYPE r). a -> b -> b

Files

CHANGELOG view
@@ -1,3 +1,10 @@+2022-09-07+        * Version bump (3.11). (#376)+        * Deprecate prettyPrint. (#362)+        * Reimplement DynStableName without unsafeCoerce. (#262)+        * Use interpreter from copilot-interpreter. (#361)+        * Remove unnecessary type constraints. (#369)+ 2022-07-07         * Version bump (3.10). (#356)         * Fix error in test case generation; enable CLI args in tests. (#337)
copilot-language.cabal view
@@ -1,6 +1,6 @@ cabal-version:       >=1.10 name:                copilot-language-version:             3.10+version:             3.11 synopsis:            A Haskell-embedded DSL for monitoring hard real-time                      distributed systems. description:@@ -35,15 +35,16 @@ library   default-language: Haskell2010   hs-source-dirs: src-  build-depends: base            >= 4.9 && < 5+  build-depends: base                >= 4.9 && < 5 -               , array           >= 0.5 && < 0.6-               , containers      >= 0.4 && < 0.7-               , data-reify      >= 0.6 && < 0.7-               , mtl             >= 2.0 && < 3+               , array               >= 0.5 && < 0.6+               , containers          >= 0.4 && < 0.7+               , data-reify          >= 0.6 && < 0.7+               , mtl                 >= 2.0 && < 3 -               , copilot-core    >= 3.10 && < 3.11-               , copilot-theorem >= 3.10 && < 3.11+               , copilot-core        >= 3.11 && < 3.12+               , copilot-interpreter >= 3.11 && < 3.12+               , copilot-theorem     >= 3.11 && < 3.12    exposed-modules: Copilot.Language                  , Copilot.Language.Operators.BitWise@@ -94,6 +95,7 @@     , test-framework-quickcheck2      , copilot-core+    , copilot-interpreter     , copilot-language    hs-source-dirs:
src/Copilot/Language.hs view
@@ -71,5 +71,6 @@  -- | Transform a high-level Copilot Language specification into a low-level -- Copilot Core specification and pretty-print it to stdout.+{-# DEPRECATED prettyPrint "This function is deprecated in Copilot 3.11." #-} prettyPrint :: Spec -> IO () prettyPrint e = fmap PP.prettyPrint (reify e) >>= putStr
src/Copilot/Language/Interpret.hs view
@@ -17,7 +17,7 @@   , interpret   ) where -import qualified Copilot.Core.Interpret as I+import qualified Copilot.Interpret as I  import Copilot.Language.Spec (Spec) import Copilot.Language.Reify
src/Copilot/Language/Operators/Array.hs view
@@ -11,8 +11,7 @@                                 , Op2 (Index)                                 , typeOf                                 , Array-                                , InnerType-                                , Flatten)+                                ) import Copilot.Language.Stream  (Stream (..))  import Data.Word                (Word32)@@ -25,9 +24,6 @@ -- '5 Word8)@, then @s .!! 3@ has type @Stream Word8@ and contains the 3rd -- element (starting from zero) of the arrays in @s@ at any point in time. (.!!) :: ( KnownNat n-         , t' ~ InnerType t-         , Flatten t t'          , Typed t-         , Typed t'          ) => Stream (Array n t) -> Stream Word32 -> Stream t arr .!! n = Op2 (Index typeOf) arr n
src/System/Mem/StableName/Dynamic.hs view
@@ -1,6 +1,7 @@ -- Copyright © 2011 National Institute of Aerospace / Galois, Inc. -{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE Safe                      #-}  module System.Mem.StableName.Dynamic   ( DynStableName(..)@@ -8,19 +9,19 @@   , makeDynStableName   ) where -import System.Mem.StableName (StableName, makeStableName, hashStableName)-import Unsafe.Coerce (unsafeCoerce) -- XXX Not safe!+import System.Mem.StableName (StableName, eqStableName, makeStableName,+                              hashStableName) -newtype DynStableName = DynStableName (StableName ())+data DynStableName = forall a . DynStableName (StableName a)  makeDynStableName :: a -> IO DynStableName makeDynStableName x =   do     stn <- makeStableName x-    return (DynStableName (unsafeCoerce stn))+    return (DynStableName stn)  hashDynStableName :: DynStableName -> Int hashDynStableName (DynStableName sn) = hashStableName sn  instance Eq DynStableName where-  DynStableName sn1 == DynStableName sn2 = sn1 == sn2+  DynStableName sn1 == DynStableName sn2 = eqStableName sn1 sn2
tests/Test/Copilot/Language/Reify.hs view
@@ -36,8 +36,8 @@ import qualified Copilot.Language.Stream             as Copilot  -- Internal imports: functions needed to test after reification-import Copilot.Core.Interpret.Eval (ExecTrace (interpObservers),-                                    ShowType (Haskell), eval)+import Copilot.Interpret.Eval (ExecTrace (interpObservers), ShowType (Haskell),+                               eval)  -- Internal imports: auxiliary functions import Test.Extra (apply1, apply2, apply3)