Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Assemble arch where
- assemble :: [AsmInstr arch] -> Either String (MachineCode arch)
- assemble1 :: forall arch. Assemble arch => AsmInstr arch -> Either String (MachineCode arch)
- prepInstrs :: forall arch. [AsmInstr arch] -> [String]
- prepInstrs' :: forall arch. [AsmInstr arch] -> ByteString
- assemble' :: MonadIO m => Architecture -> [Mode] -> [String] -> m (Either String ByteString)
Documentation
class Assemble arch where Source #
Instances
Assemble 'ArmV8ThumbLE Source # | |
Defined in Binrep.Type.Assembly.Assemble assemble :: [AsmInstr 'ArmV8ThumbLE] -> Either String (MachineCode 'ArmV8ThumbLE) Source # |
assemble1 :: forall arch. Assemble arch => AsmInstr arch -> Either String (MachineCode arch) Source #
prepInstrs :: forall arch. [AsmInstr arch] -> [String] Source #
TODO This is stupid because the assembler takes a '[String]'. Great for
end-user, poor for performance. I want the option to give it a
ByteString
that I've already prepared (as is the interface).
prepInstrs' :: forall arch. [AsmInstr arch] -> ByteString Source #
Ideally, the assembler takes a raw ByteString
. A
ShortByteString
isn't appropriate, because it could be quite
large. But this way, this function is basically "compose a bunch of short
bytestrings into one big one".
assemble' :: MonadIO m => Architecture -> [Mode] -> [String] -> m (Either String ByteString) Source #