diff-loc-0.1.0.0: Map file locations across diffs
Safe HaskellSafe-Inferred
LanguageHaskell2010

DiffLoc.Unsafe

Description

Unsafe functions that will throw errors if misused.

Synopsis

Inverting monoid actions

(.-.) :: HasCallStack => Amor p => p -> p -> Trans p infixl 6 Source #

An unsafe variant of (.-.?) which throws an exception on Nothing. This operator may appear in class laws, imposing an implicit requirement that its operands must be ordered.

Smart constructors for IndexFrom

indexFrom :: forall n a. (HasCallStack, KnownNat n, Num a, Ord a) => a -> IndexFrom n a Source #

Constructor for IndexFrom. The index must be greater than the origin, otherwise an error is raised.

origin <= indexFrom i

indexFrom0 :: (HasCallStack, Num a, Ord a) => a -> IndexFrom 0 a Source #

indexFrom specialized to 0-indexing.

indexFrom1 :: (HasCallStack, Num a, Ord a) => a -> IndexFrom 1 a Source #

indexFrom specialized to 1-indexing.

Smart constructor for Offset

offset :: (HasCallStack, Num a, Ord a) => a -> Offset a Source #

Construct an Offset. The offset must be nonnegative, otherwise an error is raised.