Safe Haskell | None |
---|---|
Language | Haskell2010 |
AOC.Common.Intcode
Documentation
Instances
Eq Memory Source # | |
Ord Memory Source # | |
Show Memory Source # | |
Generic Memory Source # | |
NFData Memory Source # | |
Defined in AOC.Common.Intcode.Memory | |
Monad m => MonadMem (StateT Memory m) Source # | |
Defined in AOC.Common.Intcode.Memory | |
type Rep Memory Source # | |
Defined in AOC.Common.Intcode.Memory type Rep Memory = D1 (MetaData "Memory" "AOC.Common.Intcode.Memory" "aoc2019-0.1.0.0-EhTXSml1EW7BLze828MOzZ" False) (C1 (MetaCons "Mem" PrefixI True) (S1 (MetaSel (Just "mPos") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Natural) :*: (S1 (MetaSel (Just "mBase") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "mRegs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map Natural Int))))) |
stepForeverMut :: (AsVMErr e, MonadError e m, PrimMonad m) => Memory -> Pipe Int Int Void m Memory Source #
untilFalse :: Monad m => m Bool -> m () Source #
stepN :: (AsVMErr e, MonadError e m) => Natural -> Memory -> Pipe Int Int Void m (Maybe Natural) Source #
yieldAndDie :: MonadError IErr m => o -> Pipe i o u m a Source #
yieldAndPass :: o -> Pipe o o u m u Source #
Constructors
VMEBadMode Int | |
VMEBadInstr Int | |
VMEBadPos Int |
Instances
Eq VMErr Source # | |
Ord VMErr Source # | |
Show VMErr Source # | |
Generic VMErr Source # | |
Exception VMErr Source # | |
Defined in AOC.Common.Intcode Methods toException :: VMErr -> SomeException # fromException :: SomeException -> Maybe VMErr # displayException :: VMErr -> String # | |
AsVMErr VMErr Source # | |
type Rep VMErr Source # | |
Defined in AOC.Common.Intcode type Rep VMErr = D1 (MetaData "VMErr" "AOC.Common.Intcode" "aoc2019-0.1.0.0-EhTXSml1EW7BLze828MOzZ" False) (C1 (MetaCons "VMEBadMode" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Int)) :+: (C1 (MetaCons "VMEBadInstr" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Int)) :+: C1 (MetaCons "VMEBadPos" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Int)))) |
Instances
Eq IErr Source # | |
Ord IErr Source # | |
Show IErr Source # | |
Generic IErr Source # | |
Exception IErr Source # | |
Defined in AOC.Common.Intcode Methods toException :: IErr -> SomeException # fromException :: SomeException -> Maybe IErr # displayException :: IErr -> String # | |
AsVMErr IErr Source # | |
AsIErr IErr Source # | |
type Rep IErr Source # | |
Defined in AOC.Common.Intcode type Rep IErr = D1 (MetaData "IErr" "AOC.Common.Intcode" "aoc2019-0.1.0.0-EhTXSml1EW7BLze828MOzZ" False) (C1 (MetaCons "IENoInput" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "IEVM" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 VMErr))) |
class AsVMErr r where Source #
Minimal complete definition
Methods
_VMErr :: Prism' r VMErr Source #
_VMEBadMode :: Prism' r Int Source #
_VMEBadInstr :: Prism' r Int Source #
_VMEBadPos :: Prism' r Int Source #
interactVM :: Memory -> IO () Source #