Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
Instances
Generic (Error st) Source # | |
Show st => Show (Error st) Source # | |
Eq st => Eq (Error st) Source # | |
type Rep (Error st) Source # | |
Defined in StreamPatch.Patch.Align type Rep (Error st) = D1 ('MetaData "Error" "StreamPatch.Patch.Align" "bytepatch-0.4.0-inplace" 'False) (C1 ('MetaCons "ErrorAlignedToNegative" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)) :+: C1 ('MetaCons "ErrorDoesntMatchExpected" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 st) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 st))) |
align :: forall sf st a ss is r rs. (Integral sf, Num st, Eq st, r ~ Const (Meta st), rs ~ RDelete r ss, RElem r ss (RIndex r ss), RSubset rs ss is) => Integer -> Patch sf ss a -> Either (Error st) (Patch st rs a) Source #
Attempt to align the given patch to 0 using the given base.
The resulting seek is guaranteed to be non-negative, so you may use natural-like types safely.
TODO Complicated.