-{-# LANGUAGE CPP, ScopedTypeVariables, DoAndIfThenElse, NondecreasingIndentation #-}
+{-# LANGUAGE CPP, ScopedTypeVariables, DoAndIfThenElse, NondecreasingIndentation, DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
-- | A disassembler for ByteCode objects as used by GHCi.
module GHC.Disassembler (
toBytes,
import Data.Monoid
import Data.Bits
import Data.Functor
+import Data.Foldable ( Foldable )
+import Data.Traversable ( Traversable )
#include "ghcautoconf.h"
#include "rts/Bytecodes.h"
| BCIBRK_FUN -- ^ We do not parse this opcode's arguments
| BCITESTLT_W Word Int
| BCITESTEQ_W Word Int
- deriving (Show)
+ deriving (Show, Functor, Traversable, Foldable)
getInthost :: Get Int
getInthost = fromIntegral <$> getWordhost