packages feed

ethereum-analyzer 3.1.0 → 3.2.0

raw patch · 7 files changed

+25/−10 lines, 7 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Ethereum.Analyzer.Debug: prettyContracts :: [Contract] -> Text
+ Ethereum.Analyzer.Solidity: [unIdfr] :: Idfr -> Text
+ Ethereum.Analyzer.Util: instance (GHC.Show.Show (n Compiler.Hoopl.Block.C Compiler.Hoopl.Block.O), GHC.Show.Show (n Compiler.Hoopl.Block.O Compiler.Hoopl.Block.O), GHC.Show.Show (n Compiler.Hoopl.Block.O Compiler.Hoopl.Block.C)) => GHC.Show.Show (Compiler.Hoopl.Block.Block n Compiler.Hoopl.Block.C Compiler.Hoopl.Block.C)

Files

ethereum-analyzer.cabal view
@@ -1,5 +1,5 @@ name:                ethereum-analyzer-version:             3.1.0+version:             3.2.0 synopsis:            A Ethereum contract analyzer. homepage:            https://github.com/zchn/ethereum-analyzer license:             Apache-2.0@@ -21,7 +21,7 @@ source-repository this   type:     git   location: https://github.com/zchn/ethereum-analyzer-  tag:      v3.1.0+  tag:      v3.2.0   subdir:   ethereum-analyzer  library
src/Ethereum/Analyzer/Debug.hs view
@@ -1,6 +1,7 @@ module Ethereum.Analyzer.Debug   ( pprintContracts   , pprintSimpleSol+  , prettyContracts   , dbgGetSimpleSol   ) where @@ -17,3 +18,6 @@  pprintContracts :: [Contract] -> IO () pprintContracts = GP.pp++prettyContracts :: [Contract] -> Text+prettyContracts = toS . GP.pretty
src/Ethereum/Analyzer/EVM/IR.hs view
@@ -62,11 +62,6 @@   show HpEnd {} = "OC: HpEnd"   show (HpCodeCopy offset) = "HpCodeCopy " <> show offset -instance Show (Block HplOp C C) where-  show (a :: Block HplOp C C) =-    let (h, m, t) = blockSplit a-    in DL.unlines $ [show h] <> DL.map show (blockToList m) <> [show t]- instance Eq (HplOp C O) where   (==) (CoOp a) (CoOp b) = a == b 
src/Ethereum/Analyzer/Solidity/Hoople.hs view
@@ -6,9 +6,10 @@   , HFunDefinition(..)   ) where -import Protolude hiding ((<*>))+import Protolude hiding ((<*>), show)  import Compiler.Hoopl+import GHC.Show (Show(..)) import Ethereum.Analyzer.Solidity.Simple  data HContract = HContract@@ -33,6 +34,14 @@         OoSt :: Statement -> HStatement O O         OcSt :: Statement -> [Label] -> HStatement O C         OcJump :: Label -> HStatement O C++instance Show (HStatement e x) where+  show (CoSt l) = show l+  show (OoSt st) = show st+  show (OcSt (StIf lval _ _) ll) = "if " <> show lval <> " -> " <> show ll+  show (OcSt (StLoop _) ll) = "loop -> " <> show ll+  show (OcSt st ll) = show st <> " -> " <> show ll+  show (OcJump l) = "jump -> " <> show l  instance NonLocal HStatement where   entryLabel (CoSt lbl) = lbl
src/Ethereum/Analyzer/Solidity/Simple.hs view
@@ -43,7 +43,7 @@   } deriving (Eq, Generic, Show, GP.Out)  newtype Idfr =-  Idfr Text+  Idfr { unIdfr :: Text }   deriving (Eq, Generic, Show, GP.Out)  data LValue
src/Ethereum/Analyzer/Util.hs view
@@ -14,8 +14,16 @@ import Data.GraphViz import Data.GraphViz.Printing hiding ((<>)) import qualified Data.Text.Lazy as DTL+import qualified Data.List as DL import GHC.Show import Text.Read (read)++instance ( Show (n C O)+         , Show (n O O)+         , Show (n O C)) => Show (Block n C C) where+  show a =+    let (h, m, t) = blockSplit a+    in DL.unlines $ [show h] <> map show (blockToList m) <> [show t]  toDotText   :: (NonLocal n, Show (Block n C C))
test/Ethereum/Analyzer/Solidity/HoopleSpec.hs view
@@ -8,7 +8,6 @@  import Ethereum.Analyzer.Solidity import Ethereum.Analyzer.TestData.Asts-import GHC.Show (Show(..))  import Test.Hspec