Copyright | (c) Rose 2019 |
---|---|
License | BSD3 |
Maintainer | rose@lain.org.uk |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
This module defines methods of controlling the flow of execution for Lazyboy.
Synopsis
- getLabel :: Lazyboy Integer
- getLocalLabel :: Lazyboy Label
- getGlobalLabel :: Lazyboy Label
- withLabel :: (Label -> Lazyboy ()) -> Lazyboy ()
- withLocalLabel :: (Label -> Lazyboy ()) -> Lazyboy ()
- embedFile :: FilePath -> Lazyboy Label
- embedImage :: FilePath -> Lazyboy Label
- embedBytes :: [Word8] -> Lazyboy Label
- freeze :: Lazyboy ()
- cond :: Condition -> Lazyboy a -> Lazyboy a
- class Comparable a b where
- if' :: Lazyboy Condition -> Lazyboy a -> Lazyboy a
- not :: Lazyboy Condition -> Lazyboy Condition
- and :: Lazyboy Condition -> Lazyboy Condition -> Lazyboy Condition
- or :: Lazyboy Condition -> Lazyboy Condition -> Lazyboy Condition
Documentation
getLabel :: Lazyboy Integer Source #
Get a label, and in the process increment the counter used to track labels. this provides a safe interface to label retrieval and utilization.
getLocalLabel :: Lazyboy Label Source #
Get a local label. The name is guaranteed to be unique.
getGlobalLabel :: Lazyboy Label Source #
Get a global label. The name is guaranteed to be unique.
withLabel :: (Label -> Lazyboy ()) -> Lazyboy () Source #
Execute an action within a global label and pass the action the label.
withLocalLabel :: (Label -> Lazyboy ()) -> Lazyboy () Source #
Execute an action within a local label and pass the action the label.
embedFile :: FilePath -> Lazyboy Label Source #
Embed a file and return a global label for it. A jump over the block of data is added to prevent the image data being executed.
embedImage :: FilePath -> Lazyboy Label Source #
Embed an image and return a (global) label for it. A jump over the block of data is added to prevent the image data being executed.
embedBytes :: [Word8] -> Lazyboy Label Source #
Embed a sequence of bytes into the file and return a (global) label for it. A jump over the block of data is added to prevent the image data being executed.
cond :: Condition -> Lazyboy a -> Lazyboy a Source #
Executes the given action provided condition flag is set.
class Comparable a b where Source #
A typeclass for comparisons between registers and values.
Instances
Comparable Word8 Register8 Source # | An instance for comparing a Word8 and an 8-bit register (this is an alias). |
Comparable Register8 Word8 Source # | An instance for comparing an 8-bit register and a Word8. |
Comparable Register8 Register8 Source # | An instance for comparing two 8-bit registers. |
if' :: Lazyboy Condition -> Lazyboy a -> Lazyboy a Source #
Executes an action which returns a condition flag, then conditionally executes another action baed on the state of that condition flag.
not :: Lazyboy Condition -> Lazyboy Condition Source #
Boolean NOT operation for inverting Condition flags.