-- 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.6.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. type family Choice a b r -- | 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 deriveThese :: Name -> [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 data JType JTBase :: JBaseType -> JType JTRef :: JRefType -> JType -- | The Jvm Primitive Types data JBaseType JTByte :: JBaseType JTChar :: JBaseType JTDouble :: JBaseType JTFloat :: JBaseType JTInt :: JBaseType JTLong :: JBaseType JTShort :: JBaseType JTBoolean :: JBaseType -- | Get the corresponding Char of a JBaseType jBaseTypeToChar :: JBaseType -> Char data JRefType JTClass :: !ClassName -> JRefType JTArray :: !JType -> JRefType -- | The number of nested arrays refTypeDepth :: JRefType -> Int -- | Method Descriptor data MethodDescriptor MethodDescriptor :: [JType] -> ReturnDescriptor -> MethodDescriptor [methodDescriptorArguments] :: MethodDescriptor -> [JType] [methodDescriptorReturnType] :: MethodDescriptor -> ReturnDescriptor -- | A ReturnDescriptor is maybe a type, otherwise it is void. -- https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.3.3 type ReturnDescriptor = 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 -- | A TypeParse should be parsable parseType :: TypeParse a => Parser a -- | A TypeParse should be printable typeToBuilder :: TypeParse a => a -> Builder -- | Parse a type from text typeFromText :: TypeParse a => Text -> Either String a -- | Convert a type into text typeToText :: TypeParse a => a -> Text -- | Run a parser that cannot be resupplied via a Partial result. -- -- This function does not force a parser to consume all of its input. -- Instead, any residual input will be discarded. To force a parser to -- consume all of its input, use something like this: -- --
--   parseOnly (myParser <* endOfInput)
--    
--   
parseOnly :: () => Parser a -> Text -> Either String a parseFlatJRefType :: Parser JRefType jRefTypeToFlatText :: JRefType -> 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.JRefType instance GHC.Generics.Generic Language.JVM.Type.JRefType instance GHC.Classes.Ord Language.JVM.Type.JRefType instance GHC.Classes.Eq Language.JVM.Type.JRefType instance GHC.Show.Show Language.JVM.Type.JRefType 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.ClassName instance Language.JVM.Type.TypeParse Language.JVM.Type.JBaseType instance Language.JVM.Type.TypeParse Language.JVM.Type.JRefType instance Language.JVM.Type.TypeParse Language.JVM.Type.JType instance Language.JVM.Type.TypeParse Language.JVM.Type.ReturnDescriptor 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 8 bit word as length type SizedList8 = SizedList Word8 -- | 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 -> Index -- | 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 :: VInteger -> JValue VLong :: VLong -> JValue VFloat :: VFloat -> JValue VDouble :: VDouble -> JValue VString :: VString -> JValue VClass :: ClassName -> JValue VMethodType :: MethodDescriptor -> JValue VMethodHandle :: MethodHandle High -> JValue type VInteger = Int32 type VLong = Int64 type VDouble = Double type VFloat = Float type VString = ByteString -- | 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 method which is from an interface newtype AbsInterfaceMethodId r AbsInterfaceMethodId :: InClass MethodId r -> AbsInterfaceMethodId r [interfaceMethodId] :: AbsInterfaceMethodId r -> InClass MethodId r -- | An method which can be from an interface data AbsVariableMethodId r AbsVariableMethodId :: !Bool -> !InClass MethodId r -> AbsVariableMethodId r [variableIsInterface] :: AbsVariableMethodId r -> !Bool [variableMethodId] :: AbsVariableMethodId r -> !InClass MethodId 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 Language.JVM.Constant.Referenceable Language.JVM.Constant.VDouble instance Language.JVM.Constant.Referenceable Language.JVM.Constant.VFloat instance Language.JVM.Constant.Referenceable Language.JVM.Constant.VLong instance Language.JVM.Constant.Referenceable Language.JVM.Constant.VInteger 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.JRefType instance Language.JVM.Constant.Referenceable Language.JVM.Type.ReturnDescriptor 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.AbsVariableMethodId 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 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 attributeFilter :: EvolveM m => m ((AttributeLocation, Text) -> Bool) attributeError :: EvolveM m => String -> m r class LabelM m => DevolveM m unlink :: (DevolveM m, Referenceable r) => r -> m Index data AttributeLocation ClassAttribute :: AttributeLocation MethodAttribute :: AttributeLocation CodeAttribute :: AttributeLocation FieldAttribute :: AttributeLocation instance GHC.Classes.Ord Language.JVM.Staged.AttributeLocation instance GHC.Classes.Eq Language.JVM.Staged.AttributeLocation instance GHC.Show.Show Language.JVM.Staged.AttributeLocation 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. data ConstantPool r -- | Access a constant in the constant pool access :: Index -> ConstantPool r -> Either PoolAccessError (Constant r) growPool :: forall b. (ConstantPool High -> Constant Low -> Either b (Constant High)) -> ConstantPool Low -> (ConstantPool High, [(b, (Index, Constant Low))]) poolCount :: ConstantPool r -> Int nextIndex :: ConstantPool r -> Index listConstants :: ConstantPool r -> [(Index, Constant r)] fromConstants :: Foldable f => f (Constant r) -> 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 -- | An index into the constant pool. type Index = Word16 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 constains a list of ByteCode instructions and the size of the -- bytecode. if the ByteCode is in the Low stage then the byte code -- instructions are annotated with the byte code offsets. data ByteCode i ByteCode :: !Word32 -> Vector (ByteCodeInst i) -> ByteCode i [byteCodeSize] :: ByteCode i -> !Word32 [byteCodeInstructions] :: ByteCode i -> Vector (ByteCodeInst i) unByteCode :: ByteCode i -> Vector (ByteCodeInst 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 generateOffsets :: DevolveM m => Vector (ByteCodeOpr High) -> m (Word16, Vector ByteCodeOffset) 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 :: !LongRelativeRef r -> !SwitchTable r -> ByteCodeOpr r -- | a lookup switch has a `default` value and a list of pairs. LookupSwitch :: !LongRelativeRef r -> Vector (Int32, LongRelativeRef r) -> ByteCodeOpr r Get :: !FieldAccess -> !DeepRef (InClass FieldId) r -> ByteCodeOpr r Put :: !FieldAccess -> !DeepRef (InClass FieldId) r -> ByteCodeOpr r Invoke :: !Invocation r -> ByteCodeOpr r New :: !Choice (RefType Low) JRefType 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 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 type WordSize = OneOrTwo -- | An offset, counted in bytes. type ByteOffset = Int64 type LocalAddress = Word16 type IncrementAmount = Int16 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.RefType Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ByteCode.RefType Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.RefType Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.RefType Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ByteCode.RefType Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ByteCode.RefType Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.ByteCode.RefType Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.RefType Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.RefType 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.High) instance GHC.Show.Show (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) 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 GHC.Classes.Ord (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.Low) instance Data.Binary.Class.Binary (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.ByteCode.ByteCode Language.JVM.Stage.High) instance GHC.Classes.Eq (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 GHC.Classes.Eq (Language.JVM.ByteCode.ByteCodeInst Language.JVM.Stage.High) instance GHC.Classes.Eq (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 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) toBCAttribute :: (IsAttribute (a Low), ByteCodeStaged a, DevolveM m) => (ByteCodeIndex -> m ByteCodeOffset) -> 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) => AttributeLocation -> f (Attribute Low) -> (Attribute High -> m a) -> m a collect :: forall c m. EvolveM m => [AttributeCollector c] -> (Attribute High -> c -> c) -> Attribute High -> m (Endo c) collectBC :: forall c m. EvolveM m => (ByteCodeOffset -> m ByteCodeIndex) -> [ByteCodeAttributeCollector c] -> (Attribute High -> c -> c) -> Attribute High -> m (Endo c) data AttributeCollector c Attr :: (a High -> c -> c) -> AttributeCollector c data ByteCodeAttributeCollector c BCAttr :: (a High -> c -> c) -> ByteCodeAttributeCollector 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 emptyStackMapTable :: StackMapTable High -- | 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 newtype Signature a Signature :: Ref Text a -> Signature a signatureToText :: Signature High -> Text signatureFromText :: Text -> Signature High data ClassSignature ClassSignature :: [TypeParameter] -> ClassType -> [ClassType] -> ClassSignature [csTypeParameters] :: ClassSignature -> [TypeParameter] [csSuperclassSignature] :: ClassSignature -> ClassType [csInterfaceSignatures] :: ClassSignature -> [ClassType] classSignatureToText :: ClassSignature -> Text classSignatureFromText :: Text -> Either String ClassSignature classSignatureP :: Parser ClassSignature data MethodSignature MethodSignature :: [TypeParameter] -> [TypeSignature] -> Maybe TypeSignature -> [ThrowsSignature] -> MethodSignature [msTypeParameters] :: MethodSignature -> [TypeParameter] [msArguments] :: MethodSignature -> [TypeSignature] [msResults] :: MethodSignature -> Maybe TypeSignature [msThrows] :: MethodSignature -> [ThrowsSignature] methodSignatureToText :: MethodSignature -> Text methodSignatureFromText :: Text -> Either String MethodSignature methodSignatureP :: Parser MethodSignature newtype FieldSignature FieldSignature :: ReferenceType -> FieldSignature [fsRefType] :: FieldSignature -> ReferenceType fieldSignatureToText :: FieldSignature -> Text fieldSignatureFromText :: Text -> Either String FieldSignature fieldSignatureP :: Parser FieldSignature data ClassType ClassType :: ClassName -> [Maybe TypeArgument] -> ClassType [ctsClassName] :: ClassType -> ClassName [ctsTypeArguments] :: ClassType -> [Maybe TypeArgument] InnerClassType :: Text -> ClassType -> [Maybe TypeArgument] -> ClassType [ctsInnerClassName] :: ClassType -> Text [ctsOuterClassType] :: ClassType -> ClassType [ctsTypeArguments] :: ClassType -> [Maybe TypeArgument] classTypeP :: Parser ClassType data ReferenceType RefClassType :: ClassType -> ReferenceType RefTypeVariable :: TypeVariable -> ReferenceType RefArrayType :: TypeSignature -> ReferenceType referenceTypeP :: Parser ReferenceType data ThrowsSignature ThrowsClass :: ClassType -> ThrowsSignature ThrowsTypeVariable :: TypeVariable -> ThrowsSignature data TypeArgument TypeArgument :: Maybe Wildcard -> ReferenceType -> TypeArgument [taWildcard] :: TypeArgument -> Maybe Wildcard [taType] :: TypeArgument -> ReferenceType data TypeParameter TypeParameter :: Text -> Maybe ReferenceType -> [ReferenceType] -> TypeParameter [tpIndentifier] :: TypeParameter -> Text [tpClassBound] :: TypeParameter -> Maybe ReferenceType [tpInterfaceBound] :: TypeParameter -> [ReferenceType] data TypeSignature ReferenceType :: ReferenceType -> TypeSignature BaseType :: JBaseType -> TypeSignature newtype TypeVariable TypeVariable :: Text -> TypeVariable [tvAsText] :: TypeVariable -> Text typeVariableP :: Parser TypeVariable data Wildcard WildPlus :: Wildcard WildMinus :: Wildcard typeParameterP :: Parser TypeParameter typeParametersP :: Parser [TypeParameter] 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 Control.DeepSeq.NFData Language.JVM.Attribute.Signature.FieldSignature instance GHC.Generics.Generic Language.JVM.Attribute.Signature.FieldSignature instance GHC.Classes.Eq Language.JVM.Attribute.Signature.FieldSignature instance GHC.Show.Show Language.JVM.Attribute.Signature.FieldSignature instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.MethodSignature instance GHC.Generics.Generic Language.JVM.Attribute.Signature.MethodSignature instance GHC.Classes.Eq Language.JVM.Attribute.Signature.MethodSignature instance GHC.Show.Show Language.JVM.Attribute.Signature.MethodSignature instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.ThrowsSignature instance GHC.Generics.Generic Language.JVM.Attribute.Signature.ThrowsSignature instance GHC.Classes.Eq Language.JVM.Attribute.Signature.ThrowsSignature instance GHC.Show.Show Language.JVM.Attribute.Signature.ThrowsSignature instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.ClassSignature instance GHC.Generics.Generic Language.JVM.Attribute.Signature.ClassSignature instance GHC.Classes.Eq Language.JVM.Attribute.Signature.ClassSignature instance GHC.Show.Show Language.JVM.Attribute.Signature.ClassSignature instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.TypeParameter instance GHC.Generics.Generic Language.JVM.Attribute.Signature.TypeParameter instance GHC.Classes.Eq Language.JVM.Attribute.Signature.TypeParameter instance GHC.Show.Show Language.JVM.Attribute.Signature.TypeParameter instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.TypeSignature instance GHC.Generics.Generic Language.JVM.Attribute.Signature.TypeSignature instance GHC.Classes.Eq Language.JVM.Attribute.Signature.TypeSignature instance GHC.Show.Show Language.JVM.Attribute.Signature.TypeSignature instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.TypeArgument instance GHC.Generics.Generic Language.JVM.Attribute.Signature.TypeArgument instance GHC.Classes.Eq Language.JVM.Attribute.Signature.TypeArgument instance GHC.Show.Show Language.JVM.Attribute.Signature.TypeArgument instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.ClassType instance GHC.Generics.Generic Language.JVM.Attribute.Signature.ClassType instance GHC.Classes.Eq Language.JVM.Attribute.Signature.ClassType instance GHC.Show.Show Language.JVM.Attribute.Signature.ClassType instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.ReferenceType instance GHC.Generics.Generic Language.JVM.Attribute.Signature.ReferenceType instance GHC.Classes.Eq Language.JVM.Attribute.Signature.ReferenceType instance GHC.Show.Show Language.JVM.Attribute.Signature.ReferenceType instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.TypeVariable instance GHC.Generics.Generic Language.JVM.Attribute.Signature.TypeVariable instance GHC.Classes.Eq Language.JVM.Attribute.Signature.TypeVariable instance GHC.Show.Show Language.JVM.Attribute.Signature.TypeVariable instance Control.DeepSeq.NFData Language.JVM.Attribute.Signature.Wildcard instance GHC.Generics.Generic Language.JVM.Attribute.Signature.Wildcard instance GHC.Classes.Eq Language.JVM.Attribute.Signature.Wildcard instance GHC.Show.Show Language.JVM.Attribute.Signature.Wildcard 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 EnclosingMethod Attribute, as documented here. module Language.JVM.Attribute.EnclosingMethod -- | The EnclosingMethod is a reference to the enclosing method of -- the class data EnclosingMethod r EnclosingMethod :: !Ref ClassName r -> !Ref (Maybe MethodId) r -> EnclosingMethod r [enclosingClassName] :: EnclosingMethod r -> !Ref ClassName r [enclosingMethodName] :: EnclosingMethod r -> !Ref (Maybe MethodId) r instance GHC.Show.Show (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.EnclosingMethod.EnclosingMethod Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.EnclosingMethod.EnclosingMethod -- | 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 -- | 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 -- | Based on the Annotations Attribute, as documented -- [here](https:/docs.oracle.comjavasespecsjvmsse8html/jvms-4.html#jvms-4.7.16). module Language.JVM.Attribute.Annotations -- | RuntimeVisibleAnnotations newtype RuntimeVisibleAnnotations r RuntimeVisibleAnnotations :: SizedList16 (Annotation r) -> RuntimeVisibleAnnotations r [asListOfRuntimeVisibleAnnotations] :: RuntimeVisibleAnnotations r -> SizedList16 (Annotation r) newtype RuntimeInvisibleAnnotations r RuntimeInvisibleAnnotations :: SizedList16 (Annotation r) -> RuntimeInvisibleAnnotations r [asListOfRuntimeInvisibleAnnotations] :: RuntimeInvisibleAnnotations r -> SizedList16 (Annotation r) newtype RuntimeVisibleParameterAnnotations r RuntimeVisibleParameterAnnotations :: SizedList8 (SizedList16 (Annotation r)) -> RuntimeVisibleParameterAnnotations r [asListOfVisibleParameterAnnotations] :: RuntimeVisibleParameterAnnotations r -> SizedList8 (SizedList16 (Annotation r)) newtype RuntimeInvisibleParameterAnnotations r RuntimeInvisibleParameterAnnotations :: SizedList8 (SizedList16 (Annotation r)) -> RuntimeInvisibleParameterAnnotations r [asListOfInvisibleParameterAnnotations] :: RuntimeInvisibleParameterAnnotations r -> SizedList8 (SizedList16 (Annotation r)) data Annotation r Annotation :: !Ref Text r -> !SizedList16 (ValuePair r) -> Annotation r [annotationType] :: Annotation r -> !Ref Text r [annotationValuePairs] :: Annotation r -> !SizedList16 (ValuePair r) data ElementValue r EByte :: !Ref VInteger r -> ElementValue r EChar :: !Ref VInteger r -> ElementValue r EDouble :: !Ref VDouble r -> ElementValue r EFloat :: !Ref VFloat r -> ElementValue r EInt :: !Ref VInteger r -> ElementValue r ELong :: !Ref VLong r -> ElementValue r EShort :: !Ref VInteger r -> ElementValue r EBoolean :: !Ref VInteger r -> ElementValue r EString :: !Ref VString r -> ElementValue r EEnum :: !EnumValue r -> ElementValue r EClass :: !Ref ReturnDescriptor r -> ElementValue r EAnnotationType :: !Annotation r -> ElementValue r EArrayType :: !SizedList16 (ElementValue r) -> ElementValue r data EnumValue r EnumValue :: !Ref FieldDescriptor r -> !Ref Text r -> EnumValue r [enumTypeName] :: EnumValue r -> !Ref FieldDescriptor r [enunConstName] :: EnumValue r -> !Ref Text r data ValuePair r ValuePair :: !Ref Text r -> !ElementValue r -> ValuePair r [name] :: ValuePair r -> !Ref Text r [value] :: ValuePair r -> !ElementValue r -- | A TypeAnnoation is targeting different types. data TypeAnnotation m r TypeAnnotation :: m r -> !TypePath -> SizedList16 (ValuePair r) -> TypeAnnotation m r [typeAnnotationTarget] :: TypeAnnotation m r -> m r [typeAnnotationPath] :: TypeAnnotation m r -> !TypePath [typeAnnotationValuePairs] :: TypeAnnotation m r -> SizedList16 (ValuePair r) type TypePath = SizedList8 TypePathItem data TypePathItem TypePathItem :: !TypePathKind -> !Word8 -> TypePathItem [typePathKind] :: TypePathItem -> !TypePathKind [typePathIndex] :: TypePathItem -> !Word8 data TypePathKind TPathInArray :: TypePathKind TPathInNested :: TypePathKind TPathWildcard :: TypePathKind TPathTypeArgument :: TypePathKind newtype RuntimeVisibleTypeAnnotations m r RuntimeVisibleTypeAnnotations :: SizedList16 (TypeAnnotation m r) -> RuntimeVisibleTypeAnnotations m r [asListOfVisibleTypeAnnotations] :: RuntimeVisibleTypeAnnotations m r -> SizedList16 (TypeAnnotation m r) newtype RuntimeInvisibleTypeAnnotations m r RuntimeInvisibleTypeAnnotations :: SizedList16 (TypeAnnotation m r) -> RuntimeInvisibleTypeAnnotations m r [asListOfInvisibleTypeAnnotations] :: RuntimeInvisibleTypeAnnotations m r -> SizedList16 (TypeAnnotation m r) -- | From here data ClassTypeAnnotation r -- | type parameter declaration of generic class or interface (0x00) ClassTypeParameterDeclaration :: !TypeParameterTarget -> ClassTypeAnnotation r -- | type in extends clause of class or interface declaration, or in -- implements clause of interface declaration (0x10) ClassSuperType :: !SupertypeTarget -> ClassTypeAnnotation r -- | type in bound of type parameter declaration of generic class or -- interface (0x11) ClassBoundTypeParameterDeclaration :: !TypeParameterBoundTarget -> ClassTypeAnnotation r data MethodTypeAnnotation r -- | type parameter declaration of generic method or constructor (0x01) MethodTypeParameterDeclaration :: !TypeParameterTarget -> MethodTypeAnnotation r -- | type in bound of type parameter declaration of generic method or -- constructor (0x12) MethodBoundTypeParameterDeclaration :: !TypeParameterBoundTarget -> MethodTypeAnnotation r -- | return type of method or constructor (0x14) MethodReturnType :: MethodTypeAnnotation r -- | receiver type of method or constructor (0x15) MethodReceiverType :: MethodTypeAnnotation r -- | type in formal parameter declaration of method, constructor, or lambda -- expression (0x16) MethodFormalParameter :: !FormalParameterTarget -> MethodTypeAnnotation r -- | type in throws clause of method or constructor (0x17) MethodThrowsClause :: !ThrowsTarget -> MethodTypeAnnotation r data FieldTypeAnnotation r -- | type in field declaration (0x13) FieldTypeAnnotation :: FieldTypeAnnotation r data CodeTypeAnnotation r -- | type in local variable declaration (0x40) LocalVariableDeclaration :: !LocalvarTarget r -> CodeTypeAnnotation r -- | type in resource variable declaration (0x41) ResourceVariableDeclaration :: !LocalvarTarget r -> CodeTypeAnnotation r -- | type in exception parameter declaration (0x42) ExceptionParameterDeclaration :: !CatchTarget -> CodeTypeAnnotation r -- | type in instanceof expression (0x43) InstanceOfExpression :: !OffsetTarget r -> CodeTypeAnnotation r -- | type in new expression (0x44) NewExpression :: !OffsetTarget r -> CodeTypeAnnotation r -- | type in method reference expression using ::new (0x45) NewMethodReferenceExpression :: !OffsetTarget r -> CodeTypeAnnotation r -- | type in method reference expression using ::Identifier (0x46) IdentifierMethodReferenceExpression :: !OffsetTarget r -> CodeTypeAnnotation r -- | type in cast expression (0x47) CastExpression :: !TypeArgumentTarget r -> CodeTypeAnnotation r -- | type argument for generic constructor in new expression or explicit -- constructor invocation statement (0x48) ConstructorExpression :: !TypeArgumentTarget r -> CodeTypeAnnotation r -- | type argument for generic method in method invocation expression -- (0x49) MethodIncovationExpression :: !TypeArgumentTarget r -> CodeTypeAnnotation r -- | type argument for generic constructor in method reference expression -- using ::new (0x4A) GenericNewMethodReferenceExpression :: !TypeArgumentTarget r -> CodeTypeAnnotation r -- | type argument for generic method in method reference expression using -- ::Identifier (0x4B) GenericIdentifierwMethodReferenceExpression :: !TypeArgumentTarget r -> CodeTypeAnnotation r -- | The TypeParameterTarget item indicates that an annotation -- appears on the declaration of the i'th type parameter of a generic -- class, generic interface, generic method, or generic constructor. type TypeParameterTarget = Word8 -- | The SupertypeTarget item indicates that an annotation appears -- on a type in the extends or implements clause of a class or interface -- declaration. -- -- A value of 65535 specifies that the annotation appears on the -- superclass in an extends clause of a class declaration. type SupertypeTarget = Word16 -- | Check if the SupertypeTarget is in the extends clauses isInExtendsClause :: SupertypeTarget -> Bool -- | The TypeParameterBoundTarget item indicates that an annotation -- appears on the i'th bound of the j'th type parameter declaration of a -- generic class, interface, method, or constructor. data TypeParameterBoundTarget -- | The FormalParameterTarget item indicates that an annotation -- appears on the type in a formal parameter declaration of a method, -- constructor, or lambda expression. The target is 0-indexed. type FormalParameterTarget = Word8 -- | The ThrowsTarget item indicates that an annotation appears on -- the i'th type in the throws clause of a method or constructor -- declaration. -- -- The value is an index into the Exceptions attribute type ThrowsTarget = Word16 -- | The LocalvarTarget item indicates that an annotation appears on -- the type in a local variable declaration, including a variable -- declared as a resource in a try-with-resources statement. -- -- The table is needed because a variable might span multiple live -- ranges. type LocalvarTarget r = SizedList16 (LocalvarEntry r) -- | An entry in the Localvar Table data LocalvarEntry r LocalvarEntry :: !ByteCodeRef r -> !Word16 -> !Word16 -> LocalvarEntry r [lvStartPc] :: LocalvarEntry r -> !ByteCodeRef r [lvLength] :: LocalvarEntry r -> !Word16 [lvLocalVarIndex] :: LocalvarEntry r -> !Word16 -- | The CatchTarget item indicates that an annotation appears on -- the i'th type in an exception parameter declaration. type CatchTarget = Word16 -- | The OffsetTarget item indicates that an annotation appears on -- either the type in an instanceof expression or a new expression, or -- the type before the :: in a method reference expression. type OffsetTarget r = ByteCodeRef r -- | The TypeArgumentTarget item indicates that an annotation -- appears either on the i'th type in a cast expression, or on the i'th -- type argument in the explicit type argument list for any of the -- following: a new expression, an explicit constructor invocation -- statement, a method invocation expression, or a method reference -- expression. data TypeArgumentTarget r TypeArgumentTarget :: !ByteCodeRef r -> Word8 -> TypeArgumentTarget r [typeArgumentOffset] :: TypeArgumentTarget r -> !ByteCodeRef r [typeArgumentIndex] :: TypeArgumentTarget r -> Word8 -- | The AnnotationDefault attribute is a variable-length attribute in the -- attributes table of certain method_info structures (§4.6), namely -- those representing elements of annotation types (JLS §9.6.1). The -- AnnotationDefault attribute records the default value (JLS §9.6.2) for -- the element represented by the method_info structure. The Java Virtual -- Machine must make this default value available so it can be applied by -- appropriate reflective APIs. newtype AnnotationDefault r AnnotationDefault :: ElementValue r -> AnnotationDefault r [defaultValue] :: AnnotationDefault r -> ElementValue r instance GHC.Show.Show (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.EnumValue Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.TypeArgumentTarget Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.LocalvarEntry Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.High) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.ValuePair Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.Annotation Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.Low) instance Control.DeepSeq.NFData Language.JVM.Attribute.Annotations.TypeParameterBoundTarget instance GHC.Generics.Generic Language.JVM.Attribute.Annotations.TypeParameterBoundTarget instance GHC.Classes.Ord Language.JVM.Attribute.Annotations.TypeParameterBoundTarget instance GHC.Show.Show Language.JVM.Attribute.Annotations.TypeParameterBoundTarget instance GHC.Classes.Eq Language.JVM.Attribute.Annotations.TypeParameterBoundTarget instance Control.DeepSeq.NFData Language.JVM.Attribute.Annotations.TypePathItem instance GHC.Generics.Generic Language.JVM.Attribute.Annotations.TypePathItem instance GHC.Classes.Ord Language.JVM.Attribute.Annotations.TypePathItem instance GHC.Classes.Eq Language.JVM.Attribute.Annotations.TypePathItem instance GHC.Show.Show Language.JVM.Attribute.Annotations.TypePathItem instance Control.DeepSeq.NFData Language.JVM.Attribute.Annotations.TypePathKind instance GHC.Generics.Generic Language.JVM.Attribute.Annotations.TypePathKind instance GHC.Classes.Ord Language.JVM.Attribute.Annotations.TypePathKind instance GHC.Classes.Eq Language.JVM.Attribute.Annotations.TypePathKind instance GHC.Show.Show Language.JVM.Attribute.Annotations.TypePathKind instance GHC.Show.Show (m Language.JVM.Stage.High) => GHC.Show.Show (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.High) instance GHC.Classes.Eq (m Language.JVM.Stage.High) => GHC.Classes.Eq (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.High) instance GHC.Generics.Generic (m Language.JVM.Stage.High) => GHC.Generics.Generic (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.High) instance (GHC.Generics.Generic (m Language.JVM.Stage.High), Control.DeepSeq.NFData (m Language.JVM.Stage.High)) => Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.High) instance GHC.Show.Show (m Language.JVM.Stage.Low) => GHC.Show.Show (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.Low) instance GHC.Classes.Eq (m Language.JVM.Stage.Low) => GHC.Classes.Eq (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.Low) instance GHC.Classes.Ord (m Language.JVM.Stage.Low) => GHC.Classes.Ord (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.Low) instance GHC.Generics.Generic (m Language.JVM.Stage.Low) => GHC.Generics.Generic (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.Low) instance (GHC.Generics.Generic (m Language.JVM.Stage.Low), Control.DeepSeq.NFData (m Language.JVM.Stage.Low)) => Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.Low) instance GHC.Show.Show (m Language.JVM.Stage.High) => GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.High) instance GHC.Classes.Eq (m Language.JVM.Stage.High) => GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.High) instance GHC.Generics.Generic (m Language.JVM.Stage.High) => GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.High) instance (GHC.Generics.Generic (m Language.JVM.Stage.High), Control.DeepSeq.NFData (m Language.JVM.Stage.High)) => Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.High) instance GHC.Show.Show (m Language.JVM.Stage.Low) => GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.Low) instance GHC.Classes.Eq (m Language.JVM.Stage.Low) => GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.Low) instance GHC.Classes.Ord (m Language.JVM.Stage.Low) => GHC.Classes.Ord (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.Low) instance GHC.Generics.Generic (m Language.JVM.Stage.Low) => GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.Low) instance (GHC.Generics.Generic (m Language.JVM.Stage.Low), Control.DeepSeq.NFData (m Language.JVM.Stage.Low)) => Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.Low) instance (GHC.Generics.Generic (m Language.JVM.Stage.Low), Data.Binary.Class.Binary (m Language.JVM.Stage.Low)) => Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.Low) instance GHC.Show.Show (m Language.JVM.Stage.High) => GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.High) instance GHC.Classes.Eq (m Language.JVM.Stage.High) => GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.High) instance GHC.Generics.Generic (m Language.JVM.Stage.High) => GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.High) instance (GHC.Generics.Generic (m Language.JVM.Stage.High), Control.DeepSeq.NFData (m Language.JVM.Stage.High)) => Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.High) instance GHC.Show.Show (m Language.JVM.Stage.Low) => GHC.Show.Show (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.Low) instance GHC.Classes.Eq (m Language.JVM.Stage.Low) => GHC.Classes.Eq (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.Low) instance GHC.Classes.Ord (m Language.JVM.Stage.Low) => GHC.Classes.Ord (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.Low) instance GHC.Generics.Generic (m Language.JVM.Stage.Low) => GHC.Generics.Generic (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.Low) instance (GHC.Generics.Generic (m Language.JVM.Stage.Low), Control.DeepSeq.NFData (m Language.JVM.Stage.Low)) => Control.DeepSeq.NFData (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.Low) instance (GHC.Generics.Generic (m Language.JVM.Stage.Low), Data.Binary.Class.Binary (m Language.JVM.Stage.Low)) => Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Annotations.AnnotationDefault Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.AnnotationDefault instance (GHC.Generics.Generic (m Language.JVM.Stage.Low), Data.Binary.Class.Binary (m Language.JVM.Stage.Low)) => Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged m => Language.JVM.Staged.Staged (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m) instance Language.JVM.ByteCode.ByteCodeStaged m => Language.JVM.ByteCode.ByteCodeStaged (Language.JVM.Attribute.Annotations.RuntimeInvisibleTypeAnnotations m) instance (GHC.Generics.Generic (m Language.JVM.Stage.Low), Data.Binary.Class.Binary (m Language.JVM.Stage.Low)) => Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged m => Language.JVM.Staged.Staged (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m) instance Language.JVM.ByteCode.ByteCodeStaged m => Language.JVM.ByteCode.ByteCodeStaged (Language.JVM.Attribute.Annotations.RuntimeVisibleTypeAnnotations m) instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.CodeTypeAnnotation Language.JVM.Stage.Low) instance Language.JVM.ByteCode.ByteCodeStaged Language.JVM.Attribute.Annotations.CodeTypeAnnotation instance Language.JVM.ByteCode.ByteCodeStaged Language.JVM.Attribute.Annotations.TypeArgumentTarget instance Language.JVM.ByteCode.ByteCodeStaged Language.JVM.Attribute.Annotations.LocalvarEntry instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.MethodTypeAnnotation Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.MethodTypeAnnotation instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.ClassTypeAnnotation Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.ClassTypeAnnotation instance Data.Binary.Class.Binary Language.JVM.Attribute.Annotations.TypeParameterBoundTarget instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.FieldTypeAnnotation instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.FieldTypeAnnotation Language.JVM.Stage.Low) instance Data.Binary.Class.Binary (m Language.JVM.Stage.Low) => Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.TypeAnnotation m Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged m => Language.JVM.Staged.Staged (Language.JVM.Attribute.Annotations.TypeAnnotation m) instance Language.JVM.ByteCode.ByteCodeStaged m => Language.JVM.ByteCode.ByteCodeStaged (Language.JVM.Attribute.Annotations.TypeAnnotation m) instance Data.Binary.Class.Binary Language.JVM.Attribute.Annotations.TypePathItem instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.RuntimeVisibleAnnotations instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.RuntimeInvisibleAnnotations instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.RuntimeVisibleParameterAnnotations instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.RuntimeInvisibleParameterAnnotations instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.Annotation instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.ValuePair instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.ElementValue instance Data.Binary.Class.Binary (Language.JVM.Attribute.Annotations.ElementValue Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.Annotations.EnumValue 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] -> [RuntimeVisibleTypeAnnotations CodeTypeAnnotation r] -> [RuntimeInvisibleTypeAnnotations CodeTypeAnnotation r] -> [Attribute r] -> CodeAttributes r [caStackMapTable] :: CodeAttributes r -> [StackMapTable r] [caLineNumberTable] :: CodeAttributes r -> [LineNumberTable r] [caVisibleTypeAnnotations] :: CodeAttributes r -> [RuntimeVisibleTypeAnnotations CodeTypeAnnotation r] [caInvisibleTypeAnnotations] :: CodeAttributes r -> [RuntimeInvisibleTypeAnnotations CodeTypeAnnotation r] [caOthers] :: CodeAttributes r -> [Attribute r] emptyCodeAttributes :: CodeAttributes High 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 i -> Vector (ByteCodeInst i) 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 -- | 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 -- | RuntimeVisibleAnnotations data RuntimeVisibleAnnotations r data RuntimeInvisibleAnnotations r data RuntimeVisibleParameterAnnotations r data RuntimeInvisibleParameterAnnotations r data RuntimeVisibleTypeAnnotations m r data RuntimeInvisibleTypeAnnotations m r -- | From here data ClassTypeAnnotation r data MethodTypeAnnotation r data FieldTypeAnnotation r data CodeTypeAnnotation r -- | The AnnotationDefault attribute is a variable-length attribute in the -- attributes table of certain method_info structures (§4.6), namely -- those representing elements of annotation types (JLS §9.6.1). The -- AnnotationDefault attribute records the default value (JLS §9.6.2) for -- the element represented by the method_info structure. The Java Virtual -- Machine must make this default value available so it can be applied by -- appropriate reflective APIs. data AnnotationDefault r -- | 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)] -- | Access flags for the InnerClass data ICAccessFlag ICPublic :: ICAccessFlag ICPrivate :: ICAccessFlag ICProtected :: ICAccessFlag ICStatic :: ICAccessFlag ICFinal :: ICAccessFlag ICInterface :: ICAccessFlag ICAbstract :: ICAccessFlag ICSynthetic :: ICAccessFlag ICAnnotation :: ICAccessFlag ICEnum :: ICAccessFlag -- | The Enumish mapping of the CAccessFlag icflags :: [(Int, ICAccessFlag)] 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.ICAccessFlag instance Control.DeepSeq.NFData Language.JVM.AccessFlag.ICAccessFlag instance GHC.Classes.Eq Language.JVM.AccessFlag.ICAccessFlag instance GHC.Show.Show Language.JVM.AccessFlag.ICAccessFlag instance GHC.Classes.Ord Language.JVM.AccessFlag.ICAccessFlag 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.ICAccessFlag 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] -> [AnnotationDefault r] -> [RuntimeVisibleAnnotations r] -> [RuntimeInvisibleAnnotations r] -> [RuntimeVisibleParameterAnnotations r] -> [RuntimeInvisibleParameterAnnotations r] -> [RuntimeVisibleTypeAnnotations MethodTypeAnnotation r] -> [RuntimeInvisibleTypeAnnotations MethodTypeAnnotation r] -> [Attribute r] -> MethodAttributes r [maCode] :: MethodAttributes r -> [Code r] [maExceptions] :: MethodAttributes r -> [Exceptions r] [maSignatures] :: MethodAttributes r -> [Signature r] [maAnnotationDefault] :: MethodAttributes r -> [AnnotationDefault r] [maVisibleAnnotations] :: MethodAttributes r -> [RuntimeVisibleAnnotations r] [maInvisibleAnnotations] :: MethodAttributes r -> [RuntimeInvisibleAnnotations r] [maVisibleParameterAnnotations] :: MethodAttributes r -> [RuntimeVisibleParameterAnnotations r] [maInvisibleParamterAnnotations] :: MethodAttributes r -> [RuntimeInvisibleParameterAnnotations r] [maVisibleTypeAnnotations] :: MethodAttributes r -> [RuntimeVisibleTypeAnnotations MethodTypeAnnotation r] [maInvisibleTypeAnnotations] :: MethodAttributes r -> [RuntimeInvisibleTypeAnnotations MethodTypeAnnotation r] [maOthers] :: MethodAttributes r -> [Attribute r] emptyMethodAttributes :: MethodAttributes High -- | 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] -> [RuntimeVisibleAnnotations r] -> [RuntimeInvisibleAnnotations r] -> [RuntimeVisibleTypeAnnotations FieldTypeAnnotation r] -> [RuntimeInvisibleTypeAnnotations FieldTypeAnnotation r] -> [Attribute r] -> FieldAttributes r [faConstantValues] :: FieldAttributes r -> [ConstantValue r] [faSignatures] :: FieldAttributes r -> [Signature r] [faVisibleAnnotations] :: FieldAttributes r -> [RuntimeVisibleAnnotations r] [faInvisibleAnnotations] :: FieldAttributes r -> [RuntimeInvisibleAnnotations r] [faVisibleTypeAnnotations] :: FieldAttributes r -> [RuntimeVisibleTypeAnnotations FieldTypeAnnotation r] [faInvisibleTypeAnnotations] :: FieldAttributes r -> [RuntimeInvisibleTypeAnnotations FieldTypeAnnotation r] [faOthers] :: FieldAttributes r -> [Attribute r] emptyFieldAttributes :: FieldAttributes High 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 -- | Based on the InnerClasses Attribute, as documented here. module Language.JVM.Attribute.InnerClasses -- | The InnerClasses is a reference to the enclosing method of the -- class newtype InnerClasses r InnerClasses :: Choice (SizedList16 (InnerClass Low)) [InnerClass High] r -> InnerClasses r [innerClasses] :: InnerClasses r -> Choice (SizedList16 (InnerClass Low)) [InnerClass High] r data InnerClass r InnerClass :: !Ref ClassName r -> !Ref (Maybe ClassName) r -> !Ref (Maybe Text) r -> !BitSet16 ICAccessFlag -> InnerClass r [icClassName] :: InnerClass r -> !Ref ClassName r [icOuterClassName] :: InnerClass r -> !Ref (Maybe ClassName) r [icInnerName] :: InnerClass r -> !Ref (Maybe Text) r [icInnerAccessFlags] :: InnerClass r -> !BitSet16 ICAccessFlag instance GHC.Show.Show (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.InnerClasses.InnerClass Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.Low) instance GHC.Classes.Eq (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.Low) instance GHC.Generics.Generic (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.Low) instance Control.DeepSeq.NFData (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.Low) instance GHC.Classes.Ord (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.Low) instance GHC.Show.Show (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.High) instance GHC.Classes.Eq (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.High) instance GHC.Generics.Generic (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.High) instance Control.DeepSeq.NFData (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.High) instance Data.Binary.Class.Binary (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.Low) instance Language.JVM.Attribute.Base.IsAttribute (Language.JVM.Attribute.InnerClasses.InnerClasses Language.JVM.Stage.Low) instance Language.JVM.Staged.Staged Language.JVM.Attribute.InnerClasses.InnerClasses instance Language.JVM.Staged.Staged Language.JVM.Attribute.InnerClasses.InnerClass -- | 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) cEnclosingMethod :: ClassFile High -> Maybe (EnclosingMethod High) cInnerClasses :: ClassFile High -> [InnerClass High] data ClassAttributes r ClassAttributes :: [BootstrapMethods r] -> [Signature r] -> [EnclosingMethod r] -> [InnerClasses r] -> [RuntimeVisibleAnnotations r] -> [RuntimeInvisibleAnnotations r] -> [RuntimeVisibleTypeAnnotations ClassTypeAnnotation r] -> [RuntimeInvisibleTypeAnnotations ClassTypeAnnotation r] -> [Attribute r] -> ClassAttributes r [caBootstrapMethods] :: ClassAttributes r -> [BootstrapMethods r] [caSignature] :: ClassAttributes r -> [Signature r] [caEnclosingMethod] :: ClassAttributes r -> [EnclosingMethod r] [caInnerClasses] :: ClassAttributes r -> [InnerClasses r] [caVisibleAnnotations] :: ClassAttributes r -> [RuntimeVisibleAnnotations r] [caInvisibleAnnotations] :: ClassAttributes r -> [RuntimeInvisibleAnnotations r] [caVisibleTypeAnnotations] :: ClassAttributes r -> [RuntimeVisibleTypeAnnotations ClassTypeAnnotation r] [caInvisibleTypeAnnotations] :: ClassAttributes r -> [RuntimeInvisibleTypeAnnotations ClassTypeAnnotation r] [caOthers] :: ClassAttributes r -> [Attribute r] emptyClassAttributes :: ClassAttributes High 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 -- | Evolve the class file to inline the references. A filter function is -- provided to remove some attributes. This will sometimes give faster -- loading times. evolveClassFile :: ((AttributeLocation, Text) -> Bool) -> 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 -- | A test function, essentially reading the classfile and then writing it -- to another file. roundtripCopy :: FilePath -> FilePath -> IO () data Evolve a -- | An error while reading a class file is represented using this data -- structure data ClassFileError data EvolveConfig EvolveConfig :: [String] -> ConstantPool High -> ((AttributeLocation, Text) -> Bool) -> EvolveConfig [ecLabel] :: EvolveConfig -> [String] [ecConstantPool] :: EvolveConfig -> ConstantPool High [ecAttributeFilter] :: EvolveConfig -> (AttributeLocation, Text) -> Bool runEvolve :: EvolveConfig -> 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 -> Index -> [Constant Low] -> CPBuilder [cpbMapper] :: CPBuilder -> Map (Constant Low) Index [cpbNextIndex] :: CPBuilder -> Index [cpbConstants] :: CPBuilder -> [Constant Low] builderFromConstantPool :: ConstantPool Low -> CPBuilder constantPoolFromBuilder :: CPBuilder -> ConstantPool Low 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 GHC.Show.Show Language.JVM.ClassFileReader.CPBuilder instance Control.Monad.Error.Class.MonadError Language.JVM.ClassFileReader.ClassFileError Language.JVM.ClassFileReader.Evolve instance Control.Monad.Reader.Class.MonadReader Language.JVM.ClassFileReader.EvolveConfig 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