-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A library for reading Java class-files -- -- A library for reading Java class-files. @package jvm-binary @version 0.1.0 -- | This module contains the stages, there are two stages; Low and -- High. Low represents closest to the metal and -- High represents closer to the conceptual representation. module Language.JVM.Stage -- | Any data structure that is in the low stage should be serializable -- using the binary library. data Low -- | Any data structure in the High stage, is easier to read. data High -- | A reference is a choice between an index and a value. type Ref v r = Choice Index v r -- | An index into the constant pool. type Index = Word16 -- | A deep reference points to something that itself is staged. type DeepRef v r = Ref (v r) r -- | The basic part of the stage system is the choice. The Choice -- chooses between two types depending on the stage. -- | This module contains some Template Haskell functions for internal use. module Language.JVM.TH -- | Derives the NFData, Show, Eq, and Generic -- from something that is Staged deriveBase :: Name -> Q [Dec] -- | Derives the bases of a list of names deriveBases :: [Name] -> Q [Dec] -- | Derives the NFData, Show, Eq, and Generic -- from something that is Staged deriveBaseWithBinary :: Name -> Q [Dec] -- | This module contains the JType, ClassName, -- MethodDescriptor, and FieldDescriptor. module Language.JVM.Type -- | A class name newtype ClassName ClassName :: Text -> ClassName [classNameAsText] :: ClassName -> Text -- | Wrapper method that converts a string representation of a class into a -- class. strCls :: String -> ClassName -- | Takes the dot representation and converts it into a class. dotCls :: Text -> ClassName -- | The JVM types data JType JTBase :: JBaseType -> JType JTClass :: ClassName -> JType JTArray :: JType -> JType -- | The Jvm Primitive Types data JBaseType JTByte :: JBaseType JTChar :: JBaseType JTDouble :: JBaseType JTFloat :: JBaseType JTInt :: JBaseType JTLong :: JBaseType JTShort :: JBaseType JTBoolean :: JBaseType -- | Method Descriptor data MethodDescriptor MethodDescriptor :: [JType] -> Maybe JType -> MethodDescriptor [methodDescriptorArguments] :: MethodDescriptor -> [JType] [methodDescriptorReturnType] :: MethodDescriptor -> Maybe JType -- | Field Descriptor newtype FieldDescriptor FieldDescriptor :: JType -> FieldDescriptor [fieldDescriptorType] :: FieldDescriptor -> JType -- | A name and a type data NameAndType a NameAndType :: Text -> a -> NameAndType a [ntName] :: NameAndType a -> Text [ntDescriptor] :: NameAndType a -> a (<:>) :: Text -> a -> NameAndType a class TypeParse a fromText :: TypeParse a => Text -> Either String a parseText :: TypeParse a => Parser a toText :: TypeParse a => a -> Text instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Language.JVM.Type.NameAndType a) instance GHC.Generics.Generic (Language.JVM.Type.NameAndType a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Language.JVM.Type.NameAndType a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Language.JVM.Type.NameAndType a) instance GHC.Show.Show a => GHC.Show.Show (Language.JVM.Type.NameAndType a) instance Control.DeepSeq.NFData Language.JVM.Type.FieldDescriptor instance GHC.Generics.Generic Language.JVM.Type.FieldDescriptor instance GHC.Classes.Eq Language.JVM.Type.FieldDescriptor instance GHC.Classes.Ord Language.JVM.Type.FieldDescriptor instance GHC.Show.Show Language.JVM.Type.FieldDescriptor instance Control.DeepSeq.NFData Language.JVM.Type.MethodDescriptor instance GHC.Generics.Generic Language.JVM.Type.MethodDescriptor instance GHC.Classes.Eq Language.JVM.Type.MethodDescriptor instance GHC.Classes.Ord Language.JVM.Type.MethodDescriptor instance GHC.Show.Show Language.JVM.Type.MethodDescriptor instance Control.DeepSeq.NFData Language.JVM.Type.JType instance GHC.Generics.Generic Language.JVM.Type.JType instance GHC.Classes.Ord Language.JVM.Type.JType instance GHC.Classes.Eq Language.JVM.Type.JType instance GHC.Show.Show Language.JVM.Type.JType instance Control.DeepSeq.NFData Language.JVM.Type.JBaseType instance GHC.Generics.Generic Language.JVM.Type.JBaseType instance GHC.Classes.Ord Language.JVM.Type.JBaseType instance GHC.Classes.Eq Language.JVM.Type.JBaseType instance GHC.Show.Show Language.JVM.Type.JBaseType instance Control.DeepSeq.NFData Language.JVM.Type.ClassName instance GHC.Generics.Generic Language.JVM.Type.ClassName instance GHC.Classes.Ord Language.JVM.Type.ClassName instance GHC.Classes.Eq Language.JVM.Type.ClassName instance Language.JVM.Type.TypeParse Language.JVM.Type.JType instance Language.JVM.Type.TypeParse Language.JVM.Type.MethodDescriptor instance Language.JVM.Type.TypeParse Language.JVM.Type.FieldDescriptor instance Language.JVM.Type.TypeParse t => Language.JVM.Type.TypeParse (Language.JVM.Type.NameAndType t) instance Language.JVM.Type.TypeParse t => Data.String.IsString (Language.JVM.Type.NameAndType t) instance Data.String.IsString Language.JVM.Type.FieldDescriptor instance Data.String.IsString Language.JVM.Type.MethodDescriptor instance Data.String.IsString Language.JVM.Type.JType instance GHC.Show.Show Language.JVM.Type.ClassName instance Data.String.IsString Language.JVM.Type.ClassName -- | This module contains utilities missing not in other libraries. module Language.JVM.Utils -- | SizedList is a binary type, that reads a list of elements. It first -- reads a length N of type w and then N items of type -- a. newtype SizedList w a SizedList :: [a] -> SizedList w a [unSizedList] :: SizedList w a -> [a] -- | Get the size of the sized list. listSize :: Num w => SizedList w a -> w -- | A byte string with a size w. newtype SizedByteString w SizedByteString :: ByteString -> SizedByteString w [unSizedByteString] :: SizedByteString w -> ByteString -- | Get the size of a SizedByteString byteStringSize :: (Num w) => SizedByteString w -> w -- | A sized list using a 16 bit word as length type SizedList16 = SizedList Word16 -- | A sized bytestring using a 32 bit word as length type SizedByteString32 = SizedByteString Word32 -- | A sized bytestring using a 16 bit word as length type SizedByteString16 = SizedByteString Word16 -- | Convert a Sized bytestring from Utf8 Text. sizedByteStringFromText :: Text -> SizedByteString w -- | Convert a Sized bytestring to Utf8 Text. sizedByteStringToText :: SizedByteString w -> Either UnicodeException Text tryDecode :: ByteString -> Either UnicodeException Text -- | A bit set of size w newtype BitSet w a BitSet :: Set a -> BitSet w a [toSet] :: BitSet w a -> Set a -- | An Enumish value, all maps to a number, but not all integers maps to a -- enumsish value. There is no guarantee that the integers will be -- subsequent. class (Eq a, Ord a) => Enumish a -- | The only needed implementation is a list of integer-enum pairs in -- ascending order, corresponding to their integer value. inOrder :: Enumish a => [(Int, a)] fromEnumish :: Enumish a => a -> Int toEnumish :: Enumish a => Int -> Maybe a -- | A BitSet using a 16 bit word type BitSet16 = BitSet Word16 -- | Takes the third element of a triple. trd :: (a, b, c) -> c instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Language.JVM.Utils.BitSet w a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Language.JVM.Utils.BitSet w a) instance GHC.Show.Show a => GHC.Show.Show (Language.JVM.Utils.BitSet w a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Language.JVM.Utils.BitSet w a) instance Data.String.IsString (Language.JVM.Utils.SizedByteString w) instance GHC.Classes.Ord (Language.JVM.Utils.SizedByteString w) instance Control.DeepSeq.NFData (Language.JVM.Utils.SizedByteString w) instance GHC.Classes.Eq (Language.JVM.Utils.SizedByteString w) instance GHC.Show.Show (Language.JVM.Utils.SizedByteString w) instance GHC.Classes.Ord a => GHC.Classes.Ord (Language.JVM.Utils.SizedList w a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Language.JVM.Utils.SizedList w a) instance GHC.Base.Functor (Language.JVM.Utils.SizedList w) instance GHC.Classes.Eq a => GHC.Classes.Eq (Language.JVM.Utils.SizedList w a) instance GHC.Show.Show a => GHC.Show.Show (Language.JVM.Utils.SizedList w a) instance (GHC.Show.Show w, Data.Bits.Bits w, Data.Binary.Class.Binary w, Language.JVM.Utils.Enumish a) => Data.Binary.Class.Binary (Language.JVM.Utils.BitSet w a) instance (Data.Binary.Class.Binary w, GHC.Real.Integral w) => Data.Binary.Class.Binary (Language.JVM.Utils.SizedByteString w) instance Data.Foldable.Foldable (Language.JVM.Utils.SizedList w) instance Data.Traversable.Traversable (Language.JVM.Utils.SizedList w) instance (Data.Binary.Class.Binary w, GHC.Real.Integral w, Data.Binary.Class.Binary a) => Data.Binary.Class.Binary (Language.JVM.Utils.SizedList w a) -- | This module contains the Constant type and the -- ConstantPool. These are essential for accessing data in the -- class-file. module Language.JVM.Constant -- | A constant is a multi word item in the ConstantPool. Each of -- the constructors are pretty much self-explanatory from the types. data Constant r CString :: !SizedByteString16 -> Constant r CInteger :: !Int32 -> Constant r CFloat :: !Float -> Constant r CLong :: !Int64 -> Constant r CDouble :: !Double -> Constant r CClassRef :: !(Ref Text r) -> Constant r CStringRef :: !(Ref ByteString r) -> Constant r CFieldRef :: !(InClass FieldId r) -> Constant r CMethodRef :: !(InClass MethodId r) -> Constant r CInterfaceMethodRef :: !(InClass MethodId r) -> Constant r CNameAndType :: !(Ref Text r) -> !(Ref Text r) -> Constant r CMethodHandle :: !(MethodHandle r) -> Constant r CMethodType :: !(Ref MethodDescriptor r) -> Constant r CInvokeDynamic :: !(InvokeDynamic r) -> Constant r -- | Some of the Constants take up more space in the constant pool -- than other. Notice that String and MethodType is not -- of size 32, but is still awarded value 1. This is due to an -- inconsistency in JVM. constantSize :: Constant r -> Int -- | Hack that returns the name of a constant. typeToStr :: Constant r -> String -- | Referenceable is something that can exist in the constant pool. class Referenceable a fromConst :: (Referenceable a, (Monad m)) => (forall a'. String -> m a') -> Constant High -> m a toConst :: (Referenceable a, (Monad m)) => a -> m (Constant High) -- | A constant pool value in java data JValue VInteger :: Int32 -> JValue VLong :: Int64 -> JValue VFloat :: Float -> JValue VDouble :: Double -> JValue VString :: ByteString -> JValue VClass :: ClassName -> JValue VMethodType :: (MethodDescriptor) -> JValue VMethodHandle :: (MethodHandle High) -> JValue -- | A class name newtype ClassName ClassName :: Text -> ClassName [classNameAsText] :: ClassName -> Text -- | Anything pointing inside a class data InClass a r InClass :: !(Ref ClassName r) -> !(Ref a r) -> InClass a r [inClassName] :: InClass a r -> !(Ref ClassName r) [inClassId] :: InClass a r -> !(Ref a r) -- | A method id in a class. type AbsMethodId = InClass MethodId -- | A field id in a class type AbsFieldId = InClass FieldId -- | An interface method, which is a class in a method. newtype AbsInterfaceMethodId r AbsInterfaceMethodId :: InClass MethodId r -> AbsInterfaceMethodId r [interfaceMethodId] :: AbsInterfaceMethodId r -> InClass MethodId r -- | In some cases we can both point to interface methods and regular -- methods. data AbsVariableMethodId r VInterfaceMethodId :: !(AbsInterfaceMethodId r) -> AbsVariableMethodId r VMethodId :: !(AbsMethodId r) -> AbsVariableMethodId r newtype MethodId MethodId :: (NameAndType MethodDescriptor) -> MethodId newtype FieldId FieldId :: (NameAndType FieldDescriptor) -> FieldId -- | A name and a type data NameAndType a NameAndType :: Text -> a -> NameAndType a [ntName] :: NameAndType a -> Text [ntDescriptor] :: NameAndType a -> a -- | Method Descriptor data MethodDescriptor -- | Field Descriptor data FieldDescriptor -- | The union type over the different method handles. data MethodHandle r MHField :: !(MethodHandleField r) -> MethodHandle r MHMethod :: !(MethodHandleMethod r) -> MethodHandle r MHInterface :: !(MethodHandleInterface r) -> MethodHandle r data MethodHandleField r MethodHandleField :: !MethodHandleFieldKind -> !(DeepRef AbsFieldId r) -> MethodHandleField r [methodHandleFieldKind] :: MethodHandleField r -> !MethodHandleFieldKind [methodHandleFieldRef] :: MethodHandleField r -> !(DeepRef AbsFieldId r) data MethodHandleMethod r MHInvokeVirtual :: !(DeepRef AbsMethodId r) -> MethodHandleMethod r -- | Since version 52.0 MHInvokeStatic :: !(DeepRef AbsVariableMethodId r) -> MethodHandleMethod r -- | Since version 52.0 MHInvokeSpecial :: !(DeepRef AbsVariableMethodId r) -> MethodHandleMethod r MHNewInvokeSpecial :: !(DeepRef AbsMethodId r) -> MethodHandleMethod r data MethodHandleInterface r MethodHandleInterface :: !(DeepRef AbsInterfaceMethodId r) -> MethodHandleInterface r [methodHandleInterfaceRef] :: MethodHandleInterface r -> !(DeepRef AbsInterfaceMethodId r) data MethodHandleFieldKind MHGetField :: MethodHandleFieldKind MHGetStatic :: MethodHandleFieldKind MHPutField :: MethodHandleFieldKind MHPutStatic :: MethodHandleFieldKind data InvokeDynamic r InvokeDynamic :: !Word16 -> !(Ref MethodId r) -> InvokeDynamic r [invokeDynamicAttrIndex] :: InvokeDynamic r -> !Word16 [invokeDynamicMethod] :: InvokeDynamic r -> !(Ref MethodId r) -- | Any data structure in the High stage, is easier to read. data High -- | Any data structure that is in the low stage should be serializable -- using the binary library. data Low instance Control.DeepSeq.NFData Language.JVM.Constant.JValue instance GHC.Generics.Generic Language.JVM.Constant.JValue instance GHC.Classes.Eq Language.JVM.Constant.JValue instance GHC.Show.Show Language.JVM.Constant.JValue instance GHC.Show.Show (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.Low) instance Language.JVM.Constant.Referenceable Language.JVM.Constant.JValue instance GHC.Show.Show (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.MethodHandleInterface Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.MethodHandleInterface Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.MethodHandleInterface Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.MethodHandleInterface Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.MethodHandleInterface Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.MethodHandleInterface Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.MethodHandleInterface Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.MethodHandleInterface Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.MethodHandleInterface Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Constant.MethodHandleMethod Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.MethodHandleMethod Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.MethodHandleMethod Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.MethodHandleMethod Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.MethodHandleMethod Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.MethodHandleMethod Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.MethodHandleMethod Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.MethodHandleMethod Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.MethodHandleMethod Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Constant.MethodHandleField Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.MethodHandleField Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.MethodHandleField Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.MethodHandleField Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.MethodHandleField Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.MethodHandleField Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.MethodHandleField Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.MethodHandleField Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.MethodHandleField Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Constant.MethodHandle Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.MethodHandle Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.MethodHandle Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.MethodHandle Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.MethodHandle Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.MethodHandle Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.MethodHandle Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.MethodHandle Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.MethodHandle Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Constant.Constant Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Constant.Constant Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Constant.Constant Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Constant.Constant Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Constant.Constant Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Constant.Constant Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Constant.Constant Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Constant.Constant Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Constant.Constant Language.JVM.Stage.High) instance GHC.Classes.Ord Language.JVM.Constant.MethodHandleFieldKind instance GHC.Generics.Generic Language.JVM.Constant.MethodHandleFieldKind instance Control.DeepSeq.NFData Language.JVM.Constant.MethodHandleFieldKind instance GHC.Show.Show Language.JVM.Constant.MethodHandleFieldKind instance GHC.Classes.Eq Language.JVM.Constant.MethodHandleFieldKind instance GHC.Generics.Generic Language.JVM.Constant.FieldId instance GHC.Classes.Ord Language.JVM.Constant.FieldId instance Control.DeepSeq.NFData Language.JVM.Constant.FieldId instance GHC.Show.Show Language.JVM.Constant.FieldId instance GHC.Classes.Eq Language.JVM.Constant.FieldId instance GHC.Generics.Generic Language.JVM.Constant.MethodId instance GHC.Classes.Ord Language.JVM.Constant.MethodId instance Control.DeepSeq.NFData Language.JVM.Constant.MethodId instance GHC.Show.Show Language.JVM.Constant.MethodId instance GHC.Classes.Eq Language.JVM.Constant.MethodId instance Language.JVM.Constant.Referenceable (Language.JVM.Constant.Constant Language.JVM.Stage.High) instance Language.JVM.Type.TypeParse a => Language.JVM.Constant.Referenceable (Language.JVM.Type.NameAndType a) instance Language.JVM.Constant.Referenceable Data.Text.Internal.Text instance Language.JVM.Constant.Referenceable Data.ByteString.Internal.ByteString instance Language.JVM.Constant.Referenceable Language.JVM.Type.ClassName instance Language.JVM.Constant.Referenceable Language.JVM.Type.MethodDescriptor instance Language.JVM.Constant.Referenceable Language.JVM.Type.FieldDescriptor instance Language.JVM.Constant.Referenceable Language.JVM.Constant.MethodId instance Language.JVM.Constant.Referenceable Language.JVM.Constant.FieldId instance Language.JVM.Constant.Referenceable (Language.JVM.Constant.InClass Language.JVM.Constant.FieldId Language.JVM.Stage.High) instance Language.JVM.Constant.Referenceable (Language.JVM.Constant.InClass Language.JVM.Constant.MethodId Language.JVM.Stage.High) instance Language.JVM.Constant.Referenceable (Language.JVM.Constant.InvokeDynamic Language.JVM.Stage.High) instance Language.JVM.Constant.Referenceable (Language.JVM.Constant.MethodHandle Language.JVM.Stage.High) instance Language.JVM.Constant.Referenceable (Language.JVM.Constant.AbsInterfaceMethodId Language.JVM.Stage.High) instance Language.JVM.Constant.Referenceable (Language.JVM.Constant.AbsVariableMethodId Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Constant.Constant Language.JVM.Stage.Low) instance Data.Binary.Class.Binary (Language.JVM.Constant.MethodHandle Language.JVM.Stage.Low) instance Data.String.IsString Language.JVM.Constant.FieldId instance Data.String.IsString Language.JVM.Constant.MethodId module Language.JVM.Staged class Staged s stage :: (Staged s, LabelM m) => (forall s'. Staged s' => s' r -> m (s' r')) -> s r -> m (s r') evolve :: (Staged s, EvolveM m) => s Low -> m (s High) devolve :: (Staged s, DevolveM m) => s High -> m (s Low) class Monad m => LabelM m -- | label the current position in the class-file, good for debugging label :: LabelM m => String -> m a -> m a class LabelM m => EvolveM m link :: (EvolveM m, Referenceable r) => Index -> m r attributeError :: EvolveM m => String -> m r class LabelM m => DevolveM m unlink :: (DevolveM m, Referenceable r) => r -> m Index instance Language.JVM.Staged.Staged Language.JVM.Constant.Constant instance Language.JVM.Staged.Staged Language.JVM.Constant.InvokeDynamic instance Language.JVM.Constant.Referenceable r => Language.JVM.Staged.Staged (Language.JVM.Constant.InClass r) instance Language.JVM.Staged.Staged Language.JVM.Constant.MethodHandle instance Language.JVM.Staged.Staged Language.JVM.Constant.MethodHandleMethod instance Language.JVM.Staged.Staged Language.JVM.Constant.MethodHandleField instance Language.JVM.Staged.Staged Language.JVM.Constant.MethodHandleInterface -- | This module contains the ConstantPool data structure and -- multiple other types, and classes. module Language.JVM.ConstantPool -- | A ConstantPool is just an IntMap. A IntMap is used, -- because constants are accessed using their byte-offset, and sometimes -- the offset depends on the constant size. See constantSize. newtype ConstantPool r ConstantPool :: IntMap (Constant r) -> ConstantPool r [unConstantPool] :: ConstantPool r -> IntMap (Constant r) -- | Access a constant in the constant pool access :: Index -> ConstantPool r -> Either PoolAccessError (Constant r) -- | Append a constant to the constant pool, and get the offset. append :: Constant r -> ConstantPool r -> (Index, ConstantPool r) -- | Creates an empty constant pool empty :: ConstantPool r -- | A pool access error data PoolAccessError PoolAccessError :: !Word16 -> String -> PoolAccessError [paErrorRef] :: PoolAccessError -> !Word16 [paErrorMsg] :: PoolAccessError -> String instance GHC.Show.Show (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.High) instance GHC.Generics.Generic Language.JVM.ConstantPool.PoolAccessError instance GHC.Classes.Eq Language.JVM.ConstantPool.PoolAccessError instance GHC.Show.Show Language.JVM.ConstantPool.PoolAccessError instance Control.DeepSeq.NFData Language.JVM.ConstantPool.PoolAccessError instance Data.Binary.Class.Binary (Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.Low) module Language.JVM.ByteCode -- | ByteCode is a newtype wrapper around a list of ByteCode instructions. -- if the ByteCode is in the Low stage then the byte code instructions -- are annotated with the byte code offsets. newtype ByteCode i ByteCode :: Choice (Word32, Vector (ByteCodeInst Low)) (Vector (ByteCodeOpr High)) i -> ByteCode i [unByteCode] :: ByteCode i -> Choice (Word32, Vector (ByteCodeInst Low)) (Vector (ByteCodeOpr High)) i evolveByteCode :: EvolveM m => ByteCode Low -> m (OffsetMap, ByteCode High) devolveByteCode :: DevolveM m => ByteCode High -> m (ByteCode Low) -- | Given an OffsetMap turn a offset into a bytecode index evolveOffset :: EvolveM m => OffsetMap -> ByteCodeOffset -> m (ByteCodeIndex) -- | Given an OffsetMap turn a offset into a bytecode index devolveOffset :: DevolveM m => ByteCode Low -> ByteCodeIndex -> m (ByteCodeOffset) class ByteCodeStaged s evolveBC :: (ByteCodeStaged s, EvolveM m) => (ByteCodeOffset -> m ByteCodeIndex) -> s Low -> m (s High) devolveBC :: (ByteCodeStaged s, DevolveM m) => (ByteCodeIndex -> m ByteCodeOffset) -> s High -> m (s Low) -- | The byte code instruction is mostly used to succinctly read and write -- an bytecode instruction from a bytestring. data ByteCodeInst r ByteCodeInst :: !(ByteCodeOffset) -> !(ByteCodeOpr r) -> ByteCodeInst r [offset] :: ByteCodeInst r -> !(ByteCodeOffset) [opcode] :: ByteCodeInst r -> !(ByteCodeOpr r) -- | A ByteCode reference is either byte code offset in the low stage, and -- a byte code index in the high state type ByteCodeRef i = Choice ByteCodeOffset ByteCodeIndex i -- | The offset in the byte code type ByteCodeOffset = Word16 -- | The index of the byte code. type ByteCodeIndex = Int -- | The offset map, maps offset to instruction ids. type OffsetMap = IntMap ByteCodeIndex -- | Return the bytecode offset from the bytecode. indexOffset :: ByteCode Low -> ByteCodeIndex -> Maybe (ByteCodeOffset) -- | Given an OffsetMap turn a offset into a bytecode index offsetIndex :: OffsetMap -> ByteCodeOffset -> Maybe (ByteCodeIndex) -- | Given low byte code we can create an OffsetMap offsetMap :: ByteCode Low -> OffsetMap data ByteCodeOpr r -- | aaload baload ... ArrayLoad :: ArrayType -> ByteCodeOpr r -- | aastore bastore ... ArrayStore :: ArrayType -> ByteCodeOpr r Push :: (BConstant r) -> ByteCodeOpr r -- | aload_0, bload_2, iload 5 ... Load :: LocalType -> LocalAddress -> ByteCodeOpr r -- | aload, bload ... Store :: LocalType -> LocalAddress -> ByteCodeOpr r -- | iadd ... BinaryOpr :: BinOpr -> ArithmeticType -> ByteCodeOpr r -- | ineg ... Neg :: ArithmeticType -> ByteCodeOpr r -- | Exclusively on int and long, identified by the word-size BitOpr :: BitOpr -> WordSize -> ByteCodeOpr r -- | Only works on ints, increment local 2 IncrLocal :: !LocalAddress -> !IncrementAmount -> ByteCodeOpr r -- | Only valid on different types Cast :: CastOpr -> ByteCodeOpr r CompareLongs :: ByteCodeOpr r -- | Compare two floating values, 2 is if float or double should be used. CompareFloating :: Bool -> WordSize -> ByteCodeOpr r -- | compare with 0 if #2 is False, and two ints from the stack if True. -- the last value is the offset If :: CmpOpr -> OneOrTwo -> (ShortRelativeRef r) -> ByteCodeOpr r -- | check if two objects are equal, or not equal. If #2 is True, compare -- with null. IfRef :: Bool -> OneOrTwo -> (ShortRelativeRef r) -> ByteCodeOpr r Goto :: (LongRelativeRef r) -> ByteCodeOpr r Jsr :: (LongRelativeRef r) -> ByteCodeOpr r Ret :: LocalAddress -> ByteCodeOpr r -- | a table switch has 2 values a `default` and a SwitchTable TableSwitch :: Int32 -> (SwitchTable r) -> ByteCodeOpr r -- | a lookup switch has a `default` value and a list of pairs. LookupSwitch :: Int32 -> (Vector (Int32, Int32)) -> ByteCodeOpr r Get :: FieldAccess -> (DeepRef (InClass FieldId) r) -> ByteCodeOpr r Put :: FieldAccess -> (DeepRef (InClass FieldId) r) -> ByteCodeOpr r Invoke :: (Invocation r) -> ByteCodeOpr r New :: (Ref ClassName r) -> ByteCodeOpr r NewArray :: (ExactArrayType r) -> ByteCodeOpr r ArrayLength :: ByteCodeOpr r Throw :: ByteCodeOpr r CheckCast :: (Ref ClassName r) -> ByteCodeOpr r InstanceOf :: (Ref ClassName r) -> ByteCodeOpr r -- | True => Enter, False => Exit Monitor :: Bool -> ByteCodeOpr r -- | Create a new multi array of 2 dimensions ^ This might point to an -- array type. MultiNewArray :: (Ref ClassName r) -> Word8 -> ByteCodeOpr r Return :: (Maybe LocalType) -> ByteCodeOpr r Nop :: ByteCodeOpr r Pop :: WordSize -> ByteCodeOpr r Dup :: WordSize -> ByteCodeOpr r DupX1 :: WordSize -> ByteCodeOpr r DupX2 :: WordSize -> ByteCodeOpr r Swap :: ByteCodeOpr r data CConstant r CNull :: CConstant r -- | CIntM1 :: CConstant r CInt0 :: CConstant r CInt1 :: CConstant r CInt2 :: CConstant r CInt3 :: CConstant r CInt4 :: CConstant r CInt5 :: CConstant r CLong0 :: CConstant r CLong1 :: CConstant r CFloat0 :: CConstant r CFloat1 :: CConstant r CFloat2 :: CConstant r CDouble0 :: CConstant r CDouble1 :: CConstant r CByte :: Int8 -> CConstant r CShort :: Int16 -> CConstant r CRef :: (Maybe WordSize) -> (Ref JValue r) -> CConstant r data OneOrTwo One :: OneOrTwo Two :: OneOrTwo data SwitchTable r SwitchTable :: Int32 -> Vector (LongRelativeRef r) -> SwitchTable r [switchLow] :: SwitchTable r -> Int32 [switchOffsets] :: SwitchTable r -> Vector (LongRelativeRef r) switchHigh :: SwitchTable Low -> Int32 data FieldAccess FldStatic :: FieldAccess FldField :: FieldAccess data Invocation r -- | Variable since 52.0 InvkSpecial :: (DeepRef AbsVariableMethodId r) -> Invocation r InvkVirtual :: (DeepRef AbsMethodId r) -> Invocation r -- | Variable since 52.0 InvkStatic :: (DeepRef AbsVariableMethodId r) -> Invocation r -- | Should be a positive number InvkInterface :: Word8 -> (DeepRef AbsInterfaceMethodId r) -> Invocation r InvkDynamic :: (DeepRef InvokeDynamic r) -> Invocation r data BinOpr Add :: BinOpr Sub :: BinOpr Mul :: BinOpr Div :: BinOpr Rem :: BinOpr data BitOpr ShL :: BitOpr ShR :: BitOpr UShR :: BitOpr And :: BitOpr Or :: BitOpr XOr :: BitOpr data CmpOpr CEq :: CmpOpr CNe :: CmpOpr CLt :: CmpOpr CGe :: CmpOpr CGt :: CmpOpr CLe :: CmpOpr data CastOpr -- | Cast from Int to a smaller type CastDown :: SmallArithmeticType -> CastOpr -- | Cast from any to any arithmetic type. Cannot be the same type. CastTo :: ArithmeticType -> ArithmeticType -> CastOpr data ArithmeticType MInt :: ArithmeticType MLong :: ArithmeticType MFloat :: ArithmeticType MDouble :: ArithmeticType data SmallArithmeticType MByte :: SmallArithmeticType MChar :: SmallArithmeticType MShort :: SmallArithmeticType data LocalType LInt :: LocalType LLong :: LocalType LFloat :: LocalType LDouble :: LocalType LRef :: LocalType data ArrayType AByte :: ArrayType AChar :: ArrayType AShort :: ArrayType AInt :: ArrayType ALong :: ArrayType AFloat :: ArrayType ADouble :: ArrayType ARef :: ArrayType data ExactArrayType r EABoolean :: ExactArrayType r EAByte :: ExactArrayType r EAChar :: ExactArrayType r EAShort :: ExactArrayType r EAInt :: ExactArrayType r EALong :: ExactArrayType r EAFloat :: ExactArrayType r EADouble :: ExactArrayType r EARef :: (Ref ClassName r) -> ExactArrayType r type WordSize = OneOrTwo -- | An offset, counted in bytes. type ByteOffset = Int64 type LocalAddress = Word16 type IncrementAmount = Int16 instance GHC.Show.Show (Language.JVM.ByteCode.ExactArrayType Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ByteCode.ExactArrayType Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.ExactArrayType Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ExactArrayType Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ByteCode.ExactArrayType Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ByteCode.ExactArrayType Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ByteCode.ExactArrayType Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.ExactArrayType Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ExactArrayType Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.ByteCode.CConstant Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ByteCode.CConstant Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.CConstant Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.CConstant Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ByteCode.CConstant Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ByteCode.CConstant Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ByteCode.CConstant Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.CConstant Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.CConstant Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.ByteCode.Invocation Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ByteCode.Invocation Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.Invocation Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.Invocation Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ByteCode.Invocation Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ByteCode.Invocation Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ByteCode.Invocation Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.Invocation Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.Invocation Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.ByteCode.SwitchTable Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ByteCode.SwitchTable Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.SwitchTable Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.SwitchTable Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ByteCode.SwitchTable Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ByteCode.SwitchTable Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ByteCode.SwitchTable Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.SwitchTable Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.SwitchTable Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.High) instance Control.DeepSeq.NFData Language.JVM.ByteCode.CastOpr instance GHC.Generics.Generic Language.JVM.ByteCode.CastOpr instance GHC.Classes.Eq Language.JVM.ByteCode.CastOpr instance GHC.Classes.Ord Language.JVM.ByteCode.CastOpr instance GHC.Show.Show Language.JVM.ByteCode.CastOpr instance Control.DeepSeq.NFData Language.JVM.ByteCode.CmpOpr instance GHC.Generics.Generic Language.JVM.ByteCode.CmpOpr instance GHC.Classes.Eq Language.JVM.ByteCode.CmpOpr instance GHC.Classes.Ord Language.JVM.ByteCode.CmpOpr instance GHC.Show.Show Language.JVM.ByteCode.CmpOpr instance Control.DeepSeq.NFData Language.JVM.ByteCode.BitOpr instance GHC.Generics.Generic Language.JVM.ByteCode.BitOpr instance GHC.Classes.Eq Language.JVM.ByteCode.BitOpr instance GHC.Classes.Ord Language.JVM.ByteCode.BitOpr instance GHC.Show.Show Language.JVM.ByteCode.BitOpr instance Control.DeepSeq.NFData Language.JVM.ByteCode.BinOpr instance GHC.Generics.Generic Language.JVM.ByteCode.BinOpr instance GHC.Classes.Eq Language.JVM.ByteCode.BinOpr instance GHC.Classes.Ord Language.JVM.ByteCode.BinOpr instance GHC.Show.Show Language.JVM.ByteCode.BinOpr instance Control.DeepSeq.NFData Language.JVM.ByteCode.OneOrTwo instance GHC.Generics.Generic Language.JVM.ByteCode.OneOrTwo instance GHC.Enum.Enum Language.JVM.ByteCode.OneOrTwo instance GHC.Classes.Eq Language.JVM.ByteCode.OneOrTwo instance GHC.Enum.Bounded Language.JVM.ByteCode.OneOrTwo instance GHC.Classes.Ord Language.JVM.ByteCode.OneOrTwo instance GHC.Show.Show Language.JVM.ByteCode.OneOrTwo instance Control.DeepSeq.NFData Language.JVM.ByteCode.FieldAccess instance GHC.Generics.Generic Language.JVM.ByteCode.FieldAccess instance GHC.Classes.Eq Language.JVM.ByteCode.FieldAccess instance GHC.Classes.Ord Language.JVM.ByteCode.FieldAccess instance GHC.Show.Show Language.JVM.ByteCode.FieldAccess instance Control.DeepSeq.NFData Language.JVM.ByteCode.ArrayType instance GHC.Generics.Generic Language.JVM.ByteCode.ArrayType instance GHC.Classes.Ord Language.JVM.ByteCode.ArrayType instance GHC.Classes.Eq Language.JVM.ByteCode.ArrayType instance GHC.Show.Show Language.JVM.ByteCode.ArrayType instance Control.DeepSeq.NFData Language.JVM.ByteCode.LocalType instance GHC.Generics.Generic Language.JVM.ByteCode.LocalType instance GHC.Enum.Bounded Language.JVM.ByteCode.LocalType instance GHC.Enum.Enum Language.JVM.ByteCode.LocalType instance GHC.Classes.Eq Language.JVM.ByteCode.LocalType instance GHC.Classes.Ord Language.JVM.ByteCode.LocalType instance GHC.Show.Show Language.JVM.ByteCode.LocalType instance Control.DeepSeq.NFData Language.JVM.ByteCode.SmallArithmeticType instance GHC.Generics.Generic Language.JVM.ByteCode.SmallArithmeticType instance GHC.Enum.Bounded Language.JVM.ByteCode.SmallArithmeticType instance GHC.Enum.Enum Language.JVM.ByteCode.SmallArithmeticType instance GHC.Classes.Eq Language.JVM.ByteCode.SmallArithmeticType instance GHC.Classes.Ord Language.JVM.ByteCode.SmallArithmeticType instance GHC.Show.Show Language.JVM.ByteCode.SmallArithmeticType instance Control.DeepSeq.NFData Language.JVM.ByteCode.ArithmeticType instance GHC.Generics.Generic Language.JVM.ByteCode.ArithmeticType instance GHC.Enum.Bounded Language.JVM.ByteCode.ArithmeticType instance GHC.Enum.Enum Language.JVM.ByteCode.ArithmeticType instance GHC.Classes.Eq Language.JVM.ByteCode.ArithmeticType instance GHC.Classes.Ord Language.JVM.ByteCode.ArithmeticType instance GHC.Show.Show Language.JVM.ByteCode.ArithmeticType instance Data.Binary.Class.Binary (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance Language.JVM.ByteCode.ByteCodeStaged Language.JVM.ByteCode.ByteCodeInst instance Data.Binary.Class.Binary (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance Data.Binary.Class.Binary (Language.JVM.ByteCode.ByteCodeOpr Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.ByteCode.CConstant instance Language.JVM.Staged.Staged Language.JVM.ByteCode.Invocation instance Language.JVM.Staged.Staged Language.JVM.ByteCode.ExactArrayType module Language.JVM.Attribute.Base -- | An Attribute, simply contains of a reference to a name and contains -- info. data Attribute r Attribute :: !(Ref Text r) -> !(SizedByteString32) -> Attribute r [aName] :: Attribute r -> !(Ref Text r) [aInfo'] :: Attribute r -> !(SizedByteString32) -- | A small helper function to extract the info as a lazy -- ByteString. aInfo :: Attribute r -> ByteString toAttribute :: (IsAttribute (a Low), Staged a, DevolveM m) => a High -> m (Attribute Low) devolveAttribute :: (IsAttribute (a Low), DevolveM m) => (a High -> m (a Low)) -> a High -> m (Attribute Low) -- | Generate an attribute in a low stage Low. fromAttribute' :: IsAttribute a => Attribute r -> Either String a toAttribute' :: forall a. IsAttribute a => a -> Attribute High -- | A class-type that describes a data-type a as an Attribute. -- Most notable it provides the fromAttribute' method that enables -- converting an Attribute to a data-type a. class (Binary a) => IsAttribute a -- | The name of an attribute. This is used to lookup an attribute. attrName :: IsAttribute a => Const Text a -- | A list of attributes and described by the expected values. type Attributes b r = Choice (SizedList16 (Attribute r)) (b r) r -- | Given a Foldable structure f, and a function that can -- calculate a monoid given an Attribute calculate the monoid over -- all attributes. fromAttributes :: (Foldable f, EvolveM m, Monoid a) => (Attribute High -> m a) -> f (Attribute Low) -> m a toC :: (EvolveM m, Staged a, IsAttribute (a Low)) => (a High -> c) -> Attribute High -> Maybe (m c) toC' :: (EvolveM m, IsAttribute (a Low)) => (a Low -> m (a High)) -> (a High -> c) -> Attribute High -> Maybe (m c) collect :: (Monad m) => c -> Attribute High -> [Attribute High -> Maybe (m c)] -> m c -- | Create a type dependent on another type b, used for accessing -- the correct attrName in IsAttribute. newtype Const a b Const :: a -> Const a b [unConst] :: Const a b -> a -- | Maybe return the first element of a list firstOne :: [a] -> Maybe a instance GHC.Show.Show (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Base.Attribute Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Base.Attribute -- | Based on the StackMapTable Attribute, as documented here. module Language.JVM.Attribute.StackMapTable -- | An Exceptions attribute is a list of references into the constant -- pool. newtype StackMapTable r StackMapTable :: Choice (SizedList16 (StackMapFrame Low)) [StackMapFrame High] r -> StackMapTable r [stackMapTable] :: StackMapTable r -> Choice (SizedList16 (StackMapFrame Low)) [StackMapFrame High] r -- | A delta offset type DeltaOffset i = Choice Word16 Int i -- | An stack map frame data StackMapFrame r StackMapFrame :: DeltaOffset r -> StackMapFrameType r -> StackMapFrame r [deltaOffset] :: StackMapFrame r -> DeltaOffset r [frameType] :: StackMapFrame r -> StackMapFrameType r -- | An stack map frame type data StackMapFrameType r SameFrame :: StackMapFrameType r SameLocals1StackItemFrame :: (VerificationTypeInfo r) -> StackMapFrameType r ChopFrame :: Word8 -> StackMapFrameType r AppendFrame :: [VerificationTypeInfo r] -> StackMapFrameType r FullFrame :: (SizedList16 (VerificationTypeInfo r)) -> (SizedList16 (VerificationTypeInfo r)) -> StackMapFrameType r -- | The types info of the stack map frame. data VerificationTypeInfo r VTTop :: VerificationTypeInfo r VTInteger :: VerificationTypeInfo r VTFloat :: VerificationTypeInfo r VTLong :: VerificationTypeInfo r VTDouble :: VerificationTypeInfo r VTNull :: VerificationTypeInfo r VTUninitializedThis :: VerificationTypeInfo r VTObject :: (Ref ClassName r) -> VerificationTypeInfo r VTUninitialized :: !Word16 -> VerificationTypeInfo r offsetDelta :: Word16 -> Word16 -> Word16 offsetDeltaInv :: Word16 -> Word16 -> Word16 instance GHC.Show.Show (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Attribute.StackMapTable.StackMapFrameType Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.StackMapTable.StackMapFrameType Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.StackMapTable.StackMapFrameType Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.StackMapTable.StackMapFrameType Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.StackMapTable.StackMapFrameType Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.StackMapTable.StackMapFrameType Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.StackMapTable.StackMapFrameType Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.StackMapTable.StackMapFrameType Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.StackMapTable.StackMapFrameType Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.StackMapTable.StackMapTable Language.JVM.Stage.Low) instance Language.JVM.ByteCode.ByteCodeStaged Language.JVM.Attribute.StackMapTable.StackMapTable instance Data.Binary.Class.Binary (Language.JVM.Attribute.StackMapTable.StackMapFrame Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.StackMapTable.StackMapFrameType instance Data.Binary.Class.Binary (Language.JVM.Attribute.StackMapTable.VerificationTypeInfo Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.StackMapTable.VerificationTypeInfo -- | Based on the Signature Attribute, as documented here, and the -- signature syntax defined here. module Language.JVM.Attribute.Signature data Signature a Signature :: (Ref Text a) -> Signature a signatureToText :: Signature High -> Text signatureFromText :: Text -> Signature High instance GHC.Show.Show (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Signature.Signature Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Signature.Signature -- | Based on the LineNumberTable Attribute, as documented here. module Language.JVM.Attribute.LineNumberTable -- | The LineNumberTable is just a mapping from offsets to -- linenumbers. newtype LineNumberTable r LineNumberTable :: IntMap LineNumber -> LineNumberTable r [lineNumberTable] :: LineNumberTable r -> IntMap LineNumber type LineNumber = Word16 type BinaryFormat = SizedList16 (Word16, LineNumber) -- | Returns the line number of an offset. linenumber :: Int -> LineNumberTable r -> Maybe LineNumber -- | Returns the line number of an offset. Helper function that also does -- the conversion from integral to int. linenumber' :: Integral a => a -> LineNumberTable r -> Maybe LineNumber instance Control.DeepSeq.NFData (Language.JVM.Attribute.LineNumberTable.LineNumberTable r) instance GHC.Generics.Generic (Language.JVM.Attribute.LineNumberTable.LineNumberTable r) instance GHC.Classes.Ord (Language.JVM.Attribute.LineNumberTable.LineNumberTable r) instance GHC.Classes.Eq (Language.JVM.Attribute.LineNumberTable.LineNumberTable r) instance GHC.Show.Show (Language.JVM.Attribute.LineNumberTable.LineNumberTable r) instance Data.Binary.Class.Binary (Language.JVM.Attribute.LineNumberTable.LineNumberTable Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.LineNumberTable.LineNumberTable Language.JVM.Stage.Low) instance Language.JVM.ByteCode.ByteCodeStaged Language.JVM.Attribute.LineNumberTable.LineNumberTable -- | Based on the Exceptions Attribute, as documented here. It -- describes the checked exceptions that a method can make. module Language.JVM.Attribute.Exceptions -- | An Exceptions attribute is a list of references into the constant -- pool. newtype Exceptions r Exceptions :: SizedList16 (Ref ClassName r) -> Exceptions r [exceptions] :: Exceptions r -> SizedList16 (Ref ClassName r) instance GHC.Show.Show (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Exceptions.Exceptions Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Exceptions.Exceptions -- | Based on the ConstantValue, as documented here. module Language.JVM.Attribute.ConstantValue -- | A constant value is just a index into the constant pool. data ConstantValue r ConstantValue :: !(Ref JValue r) -> ConstantValue r [constantValue] :: ConstantValue r -> !(Ref JValue r) instance GHC.Show.Show (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.ConstantValue.ConstantValue Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.ConstantValue.ConstantValue module Language.JVM.Attribute.Code -- | Code contains the actual byte-code. The i type parameter is -- added to allow indicate the two stages of the code file, before and -- after access to the ConstantPool. i should be either -- Ref or Deref. data Code r Code :: !(Word16) -> !(Word16) -> !((ByteCode r)) -> !(SizedList16 (ExceptionTable r)) -> !(Attributes CodeAttributes r) -> Code r [codeMaxStack] :: Code r -> !(Word16) [codeMaxLocals] :: Code r -> !(Word16) [codeByteCode] :: Code r -> !((ByteCode r)) [codeExceptionTable] :: Code r -> !(SizedList16 (ExceptionTable r)) [codeAttributes] :: Code r -> !(Attributes CodeAttributes r) data CodeAttributes r CodeAttributes :: [StackMapTable r] -> [LineNumberTable r] -> [Attribute r] -> CodeAttributes r [caStackMapTable] :: CodeAttributes r -> [StackMapTable r] [caLineNumberTable] :: CodeAttributes r -> [LineNumberTable r] [caOthers] :: CodeAttributes r -> [Attribute r] data ExceptionTable r ExceptionTable :: !(ByteCodeRef r) -> !(ByteCodeRef r) -> !(ByteCodeRef r) -> !(Ref (Maybe ClassName) r) -> ExceptionTable r -- | Inclusive program counter into code [start] :: ExceptionTable r -> !(ByteCodeRef r) -- | Exclusive program counter into code [end] :: ExceptionTable r -> !(ByteCodeRef r) -- | A program counter into code indicating the handler. [handler] :: ExceptionTable r -> !(ByteCodeRef r) [catchType] :: ExceptionTable r -> !(Ref (Maybe ClassName) r) -- | Returns the StackMapTable attribute if any codeStackMapTable :: Code High -> Maybe (StackMapTable High) -- | Extracts a list of bytecode operation codeByteCodeOprs :: Code High -> Vector (ByteCodeOpr High) -- | Extracts a list of bytecode instructions codeByteCodeInsts :: Code Low -> Vector (ByteCodeInst Low) instance GHC.Show.Show (Language.JVM.Attribute.Code.CodeAttributes Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Code.CodeAttributes Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Code.CodeAttributes Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Code.CodeAttributes Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Code.CodeAttributes Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Code.CodeAttributes Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Code.CodeAttributes Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Code.CodeAttributes Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Code.CodeAttributes Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Code.ExceptionTable Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Code.Code Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Code.Code Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Code.Code Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Code.Code Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Code.Code Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Code.Code Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Code.Code Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Code.Code Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Code.Code Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Code.Code Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Code.Code Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Code.Code instance Language.JVM.ByteCode.ByteCodeStaged Language.JVM.Attribute.Code.ExceptionTable -- | Based on the BootstrapMethods Attribute, as documented -- [here](http:/docs.oracle.comjavasespecsjvmsse8html/jvms-4.html#jvms-4.7.23). module Language.JVM.Attribute.BootstrapMethods -- | Is a list of bootstrapped methods. newtype BootstrapMethods r BootstrapMethods :: SizedList16 (BootstrapMethod r) -> BootstrapMethods r [methods'] :: BootstrapMethods r -> SizedList16 (BootstrapMethod r) -- | The methods as list methods :: BootstrapMethods r -> [BootstrapMethod r] -- | A bootstraped methods. data BootstrapMethod r BootstrapMethod :: !(DeepRef MethodHandle r) -> !(SizedList16 (Ref JValue r)) -> BootstrapMethod r [method] :: BootstrapMethod r -> !(DeepRef MethodHandle r) [arguments] :: BootstrapMethod r -> !(SizedList16 (Ref JValue r)) instance GHC.Show.Show (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.BootstrapMethods.BootstrapMethod Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.BootstrapMethods.BootstrapMethods Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.BootstrapMethods.BootstrapMethods instance Language.JVM.Staged.Staged Language.JVM.Attribute.BootstrapMethods.BootstrapMethod -- | This is the main module for accessing all kinds of Attributes. module Language.JVM.Attribute -- | Is a list of bootstrapped methods. data BootstrapMethods r -- | Code contains the actual byte-code. The i type parameter is -- added to allow indicate the two stages of the code file, before and -- after access to the ConstantPool. i should be either -- Ref or Deref. data Code r -- | A constant value is just a index into the constant pool. data ConstantValue r -- | An Exceptions attribute is a list of references into the constant -- pool. data Exceptions r -- | The LineNumberTable is just a mapping from offsets to -- linenumbers. data LineNumberTable r -- | An Exceptions attribute is a list of references into the constant -- pool. data StackMapTable r data Signature a -- | Contains the AccessFlags used in the different modules. module Language.JVM.AccessFlag -- | Access flags for the Method data MAccessFlag MPublic :: MAccessFlag MPrivate :: MAccessFlag MProtected :: MAccessFlag MStatic :: MAccessFlag MFinal :: MAccessFlag MSynchronized :: MAccessFlag MBridge :: MAccessFlag MVarargs :: MAccessFlag MNative :: MAccessFlag MAbstract :: MAccessFlag MStrictFP :: MAccessFlag MSynthetic :: MAccessFlag -- | The Enumish mapping of the MAccessFlag mflags :: [(Int, MAccessFlag)] -- | Access flags for the Field data FAccessFlag FPublic :: FAccessFlag FPrivate :: FAccessFlag FProtected :: FAccessFlag FStatic :: FAccessFlag FFinal :: FAccessFlag FVolatile :: FAccessFlag FTransient :: FAccessFlag FSynthetic :: FAccessFlag FEnum :: FAccessFlag -- | The Enumish mapping of the FAccessFlag fflags :: [(Int, FAccessFlag)] -- | Access flags for the ClassFile data CAccessFlag CPublic :: CAccessFlag CFinal :: CAccessFlag CSuper :: CAccessFlag CInterface :: CAccessFlag CAbstract :: CAccessFlag CSynthetic :: CAccessFlag CAnnotation :: CAccessFlag CEnum :: CAccessFlag CModule :: CAccessFlag -- | The Enumish mapping of the CAccessFlag cflags :: [(Int, CAccessFlag)] instance GHC.Generics.Generic Language.JVM.AccessFlag.FAccessFlag instance Control.DeepSeq.NFData Language.JVM.AccessFlag.FAccessFlag instance GHC.Classes.Eq Language.JVM.AccessFlag.FAccessFlag instance GHC.Show.Show Language.JVM.AccessFlag.FAccessFlag instance GHC.Classes.Ord Language.JVM.AccessFlag.FAccessFlag instance GHC.Generics.Generic Language.JVM.AccessFlag.CAccessFlag instance Control.DeepSeq.NFData Language.JVM.AccessFlag.CAccessFlag instance GHC.Classes.Eq Language.JVM.AccessFlag.CAccessFlag instance GHC.Show.Show Language.JVM.AccessFlag.CAccessFlag instance GHC.Classes.Ord Language.JVM.AccessFlag.CAccessFlag instance GHC.Generics.Generic Language.JVM.AccessFlag.MAccessFlag instance Control.DeepSeq.NFData Language.JVM.AccessFlag.MAccessFlag instance GHC.Classes.Eq Language.JVM.AccessFlag.MAccessFlag instance GHC.Show.Show Language.JVM.AccessFlag.MAccessFlag instance GHC.Classes.Ord Language.JVM.AccessFlag.MAccessFlag instance Language.JVM.Utils.Enumish Language.JVM.AccessFlag.FAccessFlag instance Language.JVM.Utils.Enumish Language.JVM.AccessFlag.CAccessFlag instance Language.JVM.Utils.Enumish Language.JVM.AccessFlag.MAccessFlag module Language.JVM.Method -- | A Method in the class-file, as described here. data Method r Method :: !(BitSet16 MAccessFlag) -> !(Ref Text r) -> !(Ref MethodDescriptor r) -> !(Attributes MethodAttributes r) -> Method r [mAccessFlags'] :: Method r -> !(BitSet16 MAccessFlag) [mName] :: Method r -> !(Ref Text r) [mDescriptor] :: Method r -> !(Ref MethodDescriptor r) [mAttributes] :: Method r -> !(Attributes MethodAttributes r) -- | Unpack the BitSet and get the AccessFlags as a Set. mAccessFlags :: Method r -> Set MAccessFlag data MethodAttributes r MethodAttributes :: [Code r] -> [Exceptions r] -> [Signature r] -> [Attribute r] -> MethodAttributes r [maCode] :: MethodAttributes r -> [Code r] [maExceptions] :: MethodAttributes r -> [Exceptions r] [maSignatures] :: MethodAttributes r -> [Signature r] [maOthers] :: MethodAttributes r -> [Attribute r] -- | Fetch the Code attribute, if any. There can only be one code -- attribute in a method. mCode :: Method High -> Maybe (Code High) -- | Fetch the Exceptions attribute. There can only be one -- exceptions attribute in a method. mExceptions' :: Method High -> Maybe (Exceptions High) -- | Fetches the Exceptions attribute, but turns it into an list of -- exceptions. If no exceptions field where found the empty list is -- returned mExceptions :: Method High -> [ClassName] -- | Fetches the Signature attribute, if any. mSignature :: Method High -> Maybe (Signature High) instance GHC.Show.Show (Language.JVM.Method.Method Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Method.Method Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Method.Method Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Method.Method Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Method.Method Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Method.Method Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Method.Method Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Method.Method Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Method.Method Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Method.Method Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Method.MethodAttributes Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Method.MethodAttributes Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Method.MethodAttributes Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Method.MethodAttributes Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Method.MethodAttributes Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Method.MethodAttributes Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Method.MethodAttributes Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Method.MethodAttributes Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Method.MethodAttributes Language.JVM.Stage.High) instance Language.JVM.Staged.Staged Language.JVM.Method.Method module Language.JVM.Field -- | A Field in the class-file, as described here. data Field r Field :: !(BitSet16 FAccessFlag) -> !(Ref Text r) -> !(Ref FieldDescriptor r) -> !(Attributes FieldAttributes r) -> Field r [fAccessFlags'] :: Field r -> !(BitSet16 FAccessFlag) [fName] :: Field r -> !(Ref Text r) [fDescriptor] :: Field r -> !(Ref FieldDescriptor r) [fAttributes] :: Field r -> !(Attributes FieldAttributes r) -- | Get the set of access flags fAccessFlags :: Field r -> Set FAccessFlag -- | Fetch the ConstantValue attribute. fConstantValue :: Field High -> Maybe (ConstantValue High) -- | Fetches the Signature attribute, if any. fSignature :: Field High -> Maybe (Signature High) data FieldAttributes r FieldAttributes :: [ConstantValue r] -> [Signature r] -> [Attribute r] -> FieldAttributes r [faConstantValues] :: FieldAttributes r -> [ConstantValue r] [faSignatures] :: FieldAttributes r -> [Signature r] [faOthers] :: FieldAttributes r -> [Attribute r] instance GHC.Show.Show (Language.JVM.Field.Field Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Field.Field Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Field.Field Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Field.Field Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Field.Field Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Field.Field Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Field.Field Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Field.Field Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Field.Field Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Field.Field Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Field.FieldAttributes Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Field.FieldAttributes Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Field.FieldAttributes Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Field.FieldAttributes Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Field.FieldAttributes Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Field.FieldAttributes Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Field.FieldAttributes Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Field.FieldAttributes Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Field.FieldAttributes Language.JVM.Stage.High) instance Language.JVM.Staged.Staged Language.JVM.Field.Field -- | The class file is described in this module. module Language.JVM.ClassFile -- | A ClassFile as described here. data ClassFile r ClassFile :: !Word32 -> !Word16 -> !Word16 -> !(Choice (ConstantPool r) () r) -> !(BitSet16 CAccessFlag) -> !(Ref ClassName r) -> !(Ref ClassName r) -> !(SizedList16 (Ref ClassName r)) -> !(SizedList16 (Field r)) -> !(SizedList16 (Method r)) -> !(Attributes ClassAttributes r) -> ClassFile r [cMagicNumber] :: ClassFile r -> !Word32 [cMinorVersion] :: ClassFile r -> !Word16 [cMajorVersion] :: ClassFile r -> !Word16 [cConstantPool] :: ClassFile r -> !(Choice (ConstantPool r) () r) [cAccessFlags'] :: ClassFile r -> !(BitSet16 CAccessFlag) [cThisClass] :: ClassFile r -> !(Ref ClassName r) [cSuperClass] :: ClassFile r -> !(Ref ClassName r) [cInterfaces] :: ClassFile r -> !(SizedList16 (Ref ClassName r)) [cFields'] :: ClassFile r -> !(SizedList16 (Field r)) [cMethods'] :: ClassFile r -> !(SizedList16 (Method r)) [cAttributes] :: ClassFile r -> !(Attributes ClassAttributes r) -- | Get the set of access flags cAccessFlags :: ClassFile r -> Set CAccessFlag -- | Get a list of Fields of a ClassFile. cFields :: ClassFile r -> [Field r] -- | Get a list of Methods of a ClassFile. cMethods :: ClassFile r -> [Method r] cSignature :: ClassFile High -> Maybe (Signature High) data ClassAttributes r ClassAttributes :: [BootstrapMethods r] -> [Signature r] -> [Attribute r] -> ClassAttributes r [caBootstrapMethods] :: ClassAttributes r -> [BootstrapMethods r] [caSignature] :: ClassAttributes r -> [Signature r] [caOthers] :: ClassAttributes r -> [Attribute r] cBootstrapMethods :: ClassFile High -> [BootstrapMethod High] instance GHC.Show.Show (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.ClassFile.ClassFile Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ClassFile.ClassAttributes Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ClassFile.ClassAttributes Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ClassFile.ClassAttributes Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ClassFile.ClassAttributes Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ClassFile.ClassAttributes Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ClassFile.ClassAttributes Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ClassFile.ClassAttributes Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ClassFile.ClassAttributes Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ClassFile.ClassAttributes Language.JVM.Stage.High) instance Language.JVM.Staged.Staged Language.JVM.ClassFile.ClassFile module Language.JVM.ClassFileReader -- | Top level command that combines decode and evolve. readClassFile :: ByteString -> Either ClassFileError (ClassFile High) -- | Top level command that combines devolve and encode. writeClassFile :: ClassFile High -> ByteString -- | Top level command that combines devolve and encode, but -- tries to retain exact syntax of a previous run using the class pool. writeClassFile' :: ConstantPool Low -> ClassFile High -> ByteString -- | Decode a class file from a lazy ByteString. Ensures that the -- lazy bytestring is read to EOF, and thereby closing any open files. decodeClassFile :: ByteString -> Either ClassFileError (ClassFile Low) -- | Create a lazy byte string from a class file encodeClassFile :: ClassFile Low -> ByteString -- | Changed the stage from Index to Deref evolveClassFile :: ClassFile Low -> Either ClassFileError (ClassFile High) -- | Devolve a ClassFile from High to Low. This might make the -- ClassFile contain invalid attributes, since we can't read all -- attributes. If this this is a problem see devolveClassFile'. devolveClassFile :: ClassFile High -> ClassFile Low -- | Devolve a ClassFile form High to Low, while -- maintaining the class pool of the original class file. This is useful -- if we care that unread attributes are still valid. This can cause -- untended bloat as we do not want to throw away anything in the program devolveClassFile' :: ConstantPool Low -> ClassFile High -> ClassFile Low data Evolve a -- | An error while reading a class file is represented using this data -- structure data ClassFileError runEvolve :: ConstantPool High -> Evolve a -> Either ClassFileError a -- | Untie the constant pool, this requires a special operation as the -- constant pool might reference itself. bootstrapConstantPool :: ConstantPool Low -> Either ClassFileError (ConstantPool High) data ConstantPoolBuilder a runConstantPoolBuilder :: ConstantPoolBuilder a -> CPBuilder -> (a, CPBuilder) data CPBuilder CPBuilder :: Map (Constant Low) Index -> ConstantPool Low -> CPBuilder [cpbMapper] :: CPBuilder -> Map (Constant Low) Index [cpbConstantPool] :: CPBuilder -> ConstantPool Low builderFromConstantPool :: ConstantPool Low -> CPBuilder cpbEmpty :: CPBuilder instance GHC.Base.Applicative Language.JVM.ClassFileReader.ConstantPoolBuilder instance GHC.Base.Functor Language.JVM.ClassFileReader.ConstantPoolBuilder instance Control.Monad.State.Class.MonadState Language.JVM.ClassFileReader.CPBuilder Language.JVM.ClassFileReader.ConstantPoolBuilder instance GHC.Base.Monad Language.JVM.ClassFileReader.ConstantPoolBuilder instance Control.Monad.Error.Class.MonadError Language.JVM.ClassFileReader.ClassFileError Language.JVM.ClassFileReader.Evolve instance Control.Monad.Reader.Class.MonadReader (GHC.Base.String, Language.JVM.ConstantPool.ConstantPool Language.JVM.Stage.High) Language.JVM.ClassFileReader.Evolve instance GHC.Base.Monad Language.JVM.ClassFileReader.Evolve instance GHC.Base.Applicative Language.JVM.ClassFileReader.Evolve instance GHC.Base.Functor Language.JVM.ClassFileReader.Evolve instance GHC.Generics.Generic Language.JVM.ClassFileReader.ClassFileError instance GHC.Classes.Eq Language.JVM.ClassFileReader.ClassFileError instance GHC.Show.Show Language.JVM.ClassFileReader.ClassFileError instance Language.JVM.Staged.LabelM Language.JVM.ClassFileReader.ConstantPoolBuilder instance Language.JVM.Staged.DevolveM Language.JVM.ClassFileReader.ConstantPoolBuilder instance Language.JVM.Staged.LabelM Language.JVM.ClassFileReader.Evolve instance Language.JVM.Staged.EvolveM Language.JVM.ClassFileReader.Evolve instance Control.DeepSeq.NFData Language.JVM.ClassFileReader.ClassFileError -- | The main entry point for using the library. module Language.JVM