copilot-core 3.3 → 3.4
raw patch · 6 files changed
+20/−8 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG +8/−0
- copilot-core.cabal +1/−1
- src/Copilot/Core/Locals.hs +1/−0
- src/Copilot/Core/Type/Eq.hs +8/−7
- src/Copilot/Core/Type/Read.hs +1/−0
- src/Copilot/Core/Type/Show.hs +1/−0
CHANGELOG view
@@ -1,3 +1,11 @@+2021-07-07+ * Version bump (3.4). (#231)+ * Deprecated `Copilot.Core.Locals`. (#141)+ * Deprecated `Copilot.Core.Type.Read` module. (#144)+ * Deprecated `showWit`. (#140)+ * Deprecated `Copilot.Core.Type.Eq`. (#143)+ * Remove unused module `Copilot.Core.StructMarshal`. (#139)+ 2021-05-07 * Version bump (3.3). (#217) * Fix URL in bug-reports field in cabal file. (#215)
copilot-core.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: copilot-core-version: 3.3+version: 3.4 synopsis: An intermediate representation for Copilot. description: Intermediate representation for Copilot.
src/Copilot/Core/Locals.hs view
@@ -13,6 +13,7 @@ {-# LANGUAGE ExistentialQuantification #-} module Copilot.Core.Locals+ {-# DEPRECATED "This module is deprecated." #-} ( Loc (..) , locals ) where
src/Copilot/Core/Type/Eq.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE ExistentialQuantification, GADTs #-} module Copilot.Core.Type.Eq+ {-# DEPRECATED "This module is deprecated." #-} ( EqWit (..) , eqWit , UVal (..)@@ -47,18 +48,18 @@ instance Eq UVal where (==) UVal { uType = t1- , uVal = a } + , uVal = a } UVal { uType = t2 , uVal = b } = case eqWit t1 of- EqWit -> + EqWit -> case eqWit t2 of- EqWit -> + EqWit -> let dyn1 = toDyn t1 a in case fromDyn t2 dyn1 of Nothing -> False- Just x -> - case t1 of + Just x ->+ case t1 of -- Hacks for QuickChecking between C and Haskell Float -> case t2 of Float -> approx floatErr x b@@ -66,10 +67,10 @@ "copilot-core" Double -> case t2 of Double -> approx doubleErr x b- _ -> impossible "instance Eq UVal" + _ -> impossible "instance Eq UVal" "copilot-core" _ -> x == b- where + where approx :: (Num a, Ord a) => a -> a -> a -> Bool approx err x y = x - y < err && y - x < err floatErr = 0.0001 :: Float
src/Copilot/Core/Type/Read.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE ExistentialQuantification, GADTs #-} module Copilot.Core.Type.Read+ {-# DEPRECATED "This module is deprecated." #-} ( ReadWit (..) , readWit , readWithType
src/Copilot/Core/Type/Show.hs view
@@ -24,6 +24,7 @@ -------------------------------------------------------------------------------- -- | Turn a type into a show witness.+{-# DEPRECATED showWit "This function is deprecated in Copilot 3.4." #-} showWit :: Type a -> ShowWit a showWit t = case t of