monoid-subclasses-1.2.5.1: Subclasses of Monoid

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Monoid.Instances.Positioned

Description

This module defines two monoid transformer data types, `OffsetPositioned` and `LinePositioned`. Both data types add a notion of the current position to their base monoid. In case of `OffsetPositioned`, the current position is a simple integer offset from the beginning of the monoid, and it can be applied to any `StableFactorial`. The base monoid of `LinePositioned` must be a `TextualMonoid`, but for the price it will keep track of the current line and column numbers as well.

Line number is zero-based, column one-based:

    > let p = pure "abcd\nefgh\nijkl\nmnop\n" :: LinePositioned String
    > p
    "abcd\nefgh\nijkl\nmnop\n"
    > Data.Monoid.Factorial.drop 13 p
    Line 2, column 4: "l\nmnop\n"

Synopsis

- data OffsetPositioned m
- data LinePositioned m
- extract :: Positioned p => p a -> a
- position :: Positioned p => p a -> Int
- line :: LinePositioned m -> Int
- column :: LinePositioned m -> Int

# Documentation

data OffsetPositioned m #

#### Instances

Instances details

Applicative OffsetPositioned # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods pure :: a -> OffsetPositioned a # (<*>) :: OffsetPositioned (a -> b) -> OffsetPositioned a -> OffsetPositioned b # liftA2 :: (a -> b -> c) -> OffsetPositioned a -> OffsetPositioned b -> OffsetPositioned c # (*>) :: OffsetPositioned a -> OffsetPositioned b -> OffsetPositioned b # (<*) :: OffsetPositioned a -> OffsetPositioned b -> OffsetPositioned a #
Functor OffsetPositioned # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods fmap :: (a -> b) -> OffsetPositioned a -> OffsetPositioned b # (<$) :: a -> OffsetPositioned b -> OffsetPositioned a #
(FactorialMonoid m, StableFactorial m) => Monoid (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods mempty :: OffsetPositioned m # mappend :: OffsetPositioned m -> OffsetPositioned m -> OffsetPositioned m # mconcat :: [OffsetPositioned m] -> OffsetPositioned m #
StableFactorial m => Semigroup (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods (<>) :: OffsetPositioned m -> OffsetPositioned m -> OffsetPositioned m # sconcat :: NonEmpty (OffsetPositioned m) -> OffsetPositioned m # stimes :: Integral b => b -> OffsetPositioned m -> OffsetPositioned m #
Data m => Data (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OffsetPositioned m -> c (OffsetPositioned m) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (OffsetPositioned m) # toConstr :: OffsetPositioned m -> Constr # dataTypeOf :: OffsetPositioned m -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (OffsetPositioned m)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (OffsetPositioned m)) # gmapT :: (forall b. Data b => b -> b) -> OffsetPositioned m -> OffsetPositioned m # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OffsetPositioned m -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OffsetPositioned m -> r # gmapQ :: (forall d. Data d => d -> u) -> OffsetPositioned m -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OffsetPositioned m -> u # gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> OffsetPositioned m -> m0 (OffsetPositioned m) # gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> OffsetPositioned m -> m0 (OffsetPositioned m) # gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> OffsetPositioned m -> m0 (OffsetPositioned m) #
IsString m => IsString (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods fromString :: String -> OffsetPositioned m #
Show m => Show (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods showsPrec :: Int -> OffsetPositioned m -> ShowS # show :: OffsetPositioned m -> String # showList :: [OffsetPositioned m] -> ShowS #
Eq m => Eq (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods (==) :: OffsetPositioned m -> OffsetPositioned m -> Bool # (/=) :: OffsetPositioned m -> OffsetPositioned m -> Bool #
Ord m => Ord (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods compare :: OffsetPositioned m -> OffsetPositioned m -> Ordering # (<) :: OffsetPositioned m -> OffsetPositioned m -> Bool # (<=) :: OffsetPositioned m -> OffsetPositioned m -> Bool # (>) :: OffsetPositioned m -> OffsetPositioned m -> Bool # (>=) :: OffsetPositioned m -> OffsetPositioned m -> Bool # max :: OffsetPositioned m -> OffsetPositioned m -> OffsetPositioned m # min :: OffsetPositioned m -> OffsetPositioned m -> OffsetPositioned m #
(StableFactorial m, FactorialMonoid m) => FactorialMonoid (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods splitPrimePrefix :: OffsetPositioned m -> Maybe (OffsetPositioned m, OffsetPositioned m) # splitPrimeSuffix :: OffsetPositioned m -> Maybe (OffsetPositioned m, OffsetPositioned m) # inits :: OffsetPositioned m -> [OffsetPositioned m] # tails :: OffsetPositioned m -> [OffsetPositioned m] # span :: (OffsetPositioned m -> Bool) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m) # break :: (OffsetPositioned m -> Bool) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m) # split :: (OffsetPositioned m -> Bool) -> OffsetPositioned m -> [OffsetPositioned m] # takeWhile :: (OffsetPositioned m -> Bool) -> OffsetPositioned m -> OffsetPositioned m # dropWhile :: (OffsetPositioned m -> Bool) -> OffsetPositioned m -> OffsetPositioned m # spanMaybe :: s -> (s -> OffsetPositioned m -> Maybe s) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m, s) # spanMaybe' :: s -> (s -> OffsetPositioned m -> Maybe s) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m, s) # splitAt :: Int -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m) # drop :: Int -> OffsetPositioned m -> OffsetPositioned m # take :: Int -> OffsetPositioned m -> OffsetPositioned m #
(StableFactorial m, FactorialMonoid m, LeftGCDMonoid m) => LeftGCDMonoid (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods commonPrefix :: OffsetPositioned m -> OffsetPositioned m -> OffsetPositioned m # stripCommonPrefix :: OffsetPositioned m -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m, OffsetPositioned m) #
(StableFactorial m, FactorialMonoid m, RightGCDMonoid m) => RightGCDMonoid (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods commonSuffix :: OffsetPositioned m -> OffsetPositioned m -> OffsetPositioned m # stripCommonSuffix :: OffsetPositioned m -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m, OffsetPositioned m) #
(StableFactorial m, FactorialMonoid m) => MonoidNull (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods null :: OffsetPositioned m -> Bool #
(StableFactorial m, FactorialMonoid m) => PositiveMonoid (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned
(StableFactorial m, TextualMonoid m) => TextualMonoid (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods fromText :: Text -> OffsetPositioned m # singleton :: Char -> OffsetPositioned m # splitCharacterPrefix :: OffsetPositioned m -> Maybe (Char, OffsetPositioned m) # characterPrefix :: OffsetPositioned m -> Maybe Char # map :: (Char -> Char) -> OffsetPositioned m -> OffsetPositioned m # concatMap :: (Char -> OffsetPositioned m) -> OffsetPositioned m -> OffsetPositioned m # toString :: (OffsetPositioned m -> String) -> OffsetPositioned m -> String # toText :: (OffsetPositioned m -> Text) -> OffsetPositioned m -> Text # any :: (Char -> Bool) -> OffsetPositioned m -> Bool # all :: (Char -> Bool) -> OffsetPositioned m -> Bool # foldl :: (a -> OffsetPositioned m -> a) -> (a -> Char -> a) -> a -> OffsetPositioned m -> a # foldl' :: (a -> OffsetPositioned m -> a) -> (a -> Char -> a) -> a -> OffsetPositioned m -> a # foldr :: (OffsetPositioned m -> a -> a) -> (Char -> a -> a) -> a -> OffsetPositioned m -> a # scanl :: (Char -> Char -> Char) -> Char -> OffsetPositioned m -> OffsetPositioned m # scanl1 :: (Char -> Char -> Char) -> OffsetPositioned m -> OffsetPositioned m # scanr :: (Char -> Char -> Char) -> Char -> OffsetPositioned m -> OffsetPositioned m # scanr1 :: (Char -> Char -> Char) -> OffsetPositioned m -> OffsetPositioned m # mapAccumL :: (a -> Char -> (a, Char)) -> a -> OffsetPositioned m -> (a, OffsetPositioned m) # mapAccumR :: (a -> Char -> (a, Char)) -> a -> OffsetPositioned m -> (a, OffsetPositioned m) # takeWhile :: (OffsetPositioned m -> Bool) -> (Char -> Bool) -> OffsetPositioned m -> OffsetPositioned m # dropWhile :: (OffsetPositioned m -> Bool) -> (Char -> Bool) -> OffsetPositioned m -> OffsetPositioned m # break :: (OffsetPositioned m -> Bool) -> (Char -> Bool) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m) # span :: (OffsetPositioned m -> Bool) -> (Char -> Bool) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m) # spanMaybe :: s -> (s -> OffsetPositioned m -> Maybe s) -> (s -> Char -> Maybe s) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m, s) # spanMaybe' :: s -> (s -> OffsetPositioned m -> Maybe s) -> (s -> Char -> Maybe s) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m, s) # split :: (Char -> Bool) -> OffsetPositioned m -> [OffsetPositioned m] # find :: (Char -> Bool) -> OffsetPositioned m -> Maybe Char # elem :: Char -> OffsetPositioned m -> Bool # foldl_ :: (a -> Char -> a) -> a -> OffsetPositioned m -> a # foldl_' :: (a -> Char -> a) -> a -> OffsetPositioned m -> a # foldr_ :: (Char -> a -> a) -> a -> OffsetPositioned m -> a # takeWhile_ :: Bool -> (Char -> Bool) -> OffsetPositioned m -> OffsetPositioned m # dropWhile_ :: Bool -> (Char -> Bool) -> OffsetPositioned m -> OffsetPositioned m # break_ :: Bool -> (Char -> Bool) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m) # span_ :: Bool -> (Char -> Bool) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m) # spanMaybe_ :: s -> (s -> Char -> Maybe s) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m, s) # spanMaybe_' :: s -> (s -> Char -> Maybe s) -> OffsetPositioned m -> (OffsetPositioned m, OffsetPositioned m, s) #
(StableFactorial m, LeftReductive m) => LeftReductive (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods isPrefixOf :: OffsetPositioned m -> OffsetPositioned m -> Bool # stripPrefix :: OffsetPositioned m -> OffsetPositioned m -> Maybe (OffsetPositioned m) #
(StableFactorial m, FactorialMonoid m, RightReductive m) => RightReductive (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods isSuffixOf :: OffsetPositioned m -> OffsetPositioned m -> Bool # stripSuffix :: OffsetPositioned m -> OffsetPositioned m -> Maybe (OffsetPositioned m) #
StableFactorial m => Factorial (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods factors :: OffsetPositioned m -> [OffsetPositioned m] # primePrefix :: OffsetPositioned m -> OffsetPositioned m # primeSuffix :: OffsetPositioned m -> OffsetPositioned m # foldl :: (a -> OffsetPositioned m -> a) -> a -> OffsetPositioned m -> a # foldl' :: (a -> OffsetPositioned m -> a) -> a -> OffsetPositioned m -> a # foldr :: (OffsetPositioned m -> a -> a) -> a -> OffsetPositioned m -> a # length :: OffsetPositioned m -> Int # foldMap :: Monoid n => (OffsetPositioned m -> n) -> OffsetPositioned m -> n # reverse :: OffsetPositioned m -> OffsetPositioned m #
StableFactorial m => StableFactorial (OffsetPositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned

data LinePositioned m #

#### Instances

Instances details

Applicative LinePositioned # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods pure :: a -> LinePositioned a # (<*>) :: LinePositioned (a -> b) -> LinePositioned a -> LinePositioned b # liftA2 :: (a -> b -> c) -> LinePositioned a -> LinePositioned b -> LinePositioned c # (*>) :: LinePositioned a -> LinePositioned b -> LinePositioned b # (<*) :: LinePositioned a -> LinePositioned b -> LinePositioned a #
Functor LinePositioned # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods fmap :: (a -> b) -> LinePositioned a -> LinePositioned b # (<$) :: a -> LinePositioned b -> LinePositioned a #
(StableFactorial m, TextualMonoid m) => Monoid (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods mempty :: LinePositioned m # mappend :: LinePositioned m -> LinePositioned m -> LinePositioned m # mconcat :: [LinePositioned m] -> LinePositioned m #
(StableFactorial m, TextualMonoid m) => Semigroup (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods (<>) :: LinePositioned m -> LinePositioned m -> LinePositioned m # sconcat :: NonEmpty (LinePositioned m) -> LinePositioned m # stimes :: Integral b => b -> LinePositioned m -> LinePositioned m #
Data m => Data (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LinePositioned m -> c (LinePositioned m) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LinePositioned m) # toConstr :: LinePositioned m -> Constr # dataTypeOf :: LinePositioned m -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LinePositioned m)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LinePositioned m)) # gmapT :: (forall b. Data b => b -> b) -> LinePositioned m -> LinePositioned m # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LinePositioned m -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LinePositioned m -> r # gmapQ :: (forall d. Data d => d -> u) -> LinePositioned m -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LinePositioned m -> u # gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> LinePositioned m -> m0 (LinePositioned m) # gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> LinePositioned m -> m0 (LinePositioned m) # gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> LinePositioned m -> m0 (LinePositioned m) #
IsString m => IsString (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods fromString :: String -> LinePositioned m #
Show m => Show (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods showsPrec :: Int -> LinePositioned m -> ShowS # show :: LinePositioned m -> String # showList :: [LinePositioned m] -> ShowS #
Eq m => Eq (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods (==) :: LinePositioned m -> LinePositioned m -> Bool # (/=) :: LinePositioned m -> LinePositioned m -> Bool #
Ord m => Ord (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods compare :: LinePositioned m -> LinePositioned m -> Ordering # (<) :: LinePositioned m -> LinePositioned m -> Bool # (<=) :: LinePositioned m -> LinePositioned m -> Bool # (>) :: LinePositioned m -> LinePositioned m -> Bool # (>=) :: LinePositioned m -> LinePositioned m -> Bool # max :: LinePositioned m -> LinePositioned m -> LinePositioned m # min :: LinePositioned m -> LinePositioned m -> LinePositioned m #
(StableFactorial m, TextualMonoid m) => FactorialMonoid (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods splitPrimePrefix :: LinePositioned m -> Maybe (LinePositioned m, LinePositioned m) # splitPrimeSuffix :: LinePositioned m -> Maybe (LinePositioned m, LinePositioned m) # inits :: LinePositioned m -> [LinePositioned m] # tails :: LinePositioned m -> [LinePositioned m] # span :: (LinePositioned m -> Bool) -> LinePositioned m -> (LinePositioned m, LinePositioned m) # break :: (LinePositioned m -> Bool) -> LinePositioned m -> (LinePositioned m, LinePositioned m) # split :: (LinePositioned m -> Bool) -> LinePositioned m -> [LinePositioned m] # takeWhile :: (LinePositioned m -> Bool) -> LinePositioned m -> LinePositioned m # dropWhile :: (LinePositioned m -> Bool) -> LinePositioned m -> LinePositioned m # spanMaybe :: s -> (s -> LinePositioned m -> Maybe s) -> LinePositioned m -> (LinePositioned m, LinePositioned m, s) # spanMaybe' :: s -> (s -> LinePositioned m -> Maybe s) -> LinePositioned m -> (LinePositioned m, LinePositioned m, s) # splitAt :: Int -> LinePositioned m -> (LinePositioned m, LinePositioned m) # drop :: Int -> LinePositioned m -> LinePositioned m # take :: Int -> LinePositioned m -> LinePositioned m #
(StableFactorial m, TextualMonoid m, LeftGCDMonoid m) => LeftGCDMonoid (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods commonPrefix :: LinePositioned m -> LinePositioned m -> LinePositioned m # stripCommonPrefix :: LinePositioned m -> LinePositioned m -> (LinePositioned m, LinePositioned m, LinePositioned m) #
(StableFactorial m, TextualMonoid m, RightGCDMonoid m) => RightGCDMonoid (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods commonSuffix :: LinePositioned m -> LinePositioned m -> LinePositioned m # stripCommonSuffix :: LinePositioned m -> LinePositioned m -> (LinePositioned m, LinePositioned m, LinePositioned m) #
(StableFactorial m, TextualMonoid m, MonoidNull m) => MonoidNull (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods null :: LinePositioned m -> Bool #
(StableFactorial m, TextualMonoid m) => PositiveMonoid (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned
(StableFactorial m, TextualMonoid m) => TextualMonoid (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods fromText :: Text -> LinePositioned m # singleton :: Char -> LinePositioned m # splitCharacterPrefix :: LinePositioned m -> Maybe (Char, LinePositioned m) # characterPrefix :: LinePositioned m -> Maybe Char # map :: (Char -> Char) -> LinePositioned m -> LinePositioned m # concatMap :: (Char -> LinePositioned m) -> LinePositioned m -> LinePositioned m # toString :: (LinePositioned m -> String) -> LinePositioned m -> String # toText :: (LinePositioned m -> Text) -> LinePositioned m -> Text # any :: (Char -> Bool) -> LinePositioned m -> Bool # all :: (Char -> Bool) -> LinePositioned m -> Bool # foldl :: (a -> LinePositioned m -> a) -> (a -> Char -> a) -> a -> LinePositioned m -> a # foldl' :: (a -> LinePositioned m -> a) -> (a -> Char -> a) -> a -> LinePositioned m -> a # foldr :: (LinePositioned m -> a -> a) -> (Char -> a -> a) -> a -> LinePositioned m -> a # scanl :: (Char -> Char -> Char) -> Char -> LinePositioned m -> LinePositioned m # scanl1 :: (Char -> Char -> Char) -> LinePositioned m -> LinePositioned m # scanr :: (Char -> Char -> Char) -> Char -> LinePositioned m -> LinePositioned m # scanr1 :: (Char -> Char -> Char) -> LinePositioned m -> LinePositioned m # mapAccumL :: (a -> Char -> (a, Char)) -> a -> LinePositioned m -> (a, LinePositioned m) # mapAccumR :: (a -> Char -> (a, Char)) -> a -> LinePositioned m -> (a, LinePositioned m) # takeWhile :: (LinePositioned m -> Bool) -> (Char -> Bool) -> LinePositioned m -> LinePositioned m # dropWhile :: (LinePositioned m -> Bool) -> (Char -> Bool) -> LinePositioned m -> LinePositioned m # break :: (LinePositioned m -> Bool) -> (Char -> Bool) -> LinePositioned m -> (LinePositioned m, LinePositioned m) # span :: (LinePositioned m -> Bool) -> (Char -> Bool) -> LinePositioned m -> (LinePositioned m, LinePositioned m) # spanMaybe :: s -> (s -> LinePositioned m -> Maybe s) -> (s -> Char -> Maybe s) -> LinePositioned m -> (LinePositioned m, LinePositioned m, s) # spanMaybe' :: s -> (s -> LinePositioned m -> Maybe s) -> (s -> Char -> Maybe s) -> LinePositioned m -> (LinePositioned m, LinePositioned m, s) # split :: (Char -> Bool) -> LinePositioned m -> [LinePositioned m] # find :: (Char -> Bool) -> LinePositioned m -> Maybe Char # elem :: Char -> LinePositioned m -> Bool # foldl_ :: (a -> Char -> a) -> a -> LinePositioned m -> a # foldl_' :: (a -> Char -> a) -> a -> LinePositioned m -> a # foldr_ :: (Char -> a -> a) -> a -> LinePositioned m -> a # takeWhile_ :: Bool -> (Char -> Bool) -> LinePositioned m -> LinePositioned m # dropWhile_ :: Bool -> (Char -> Bool) -> LinePositioned m -> LinePositioned m # break_ :: Bool -> (Char -> Bool) -> LinePositioned m -> (LinePositioned m, LinePositioned m) # span_ :: Bool -> (Char -> Bool) -> LinePositioned m -> (LinePositioned m, LinePositioned m) # spanMaybe_ :: s -> (s -> Char -> Maybe s) -> LinePositioned m -> (LinePositioned m, LinePositioned m, s) # spanMaybe_' :: s -> (s -> Char -> Maybe s) -> LinePositioned m -> (LinePositioned m, LinePositioned m, s) #
(StableFactorial m, TextualMonoid m) => LeftReductive (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods isPrefixOf :: LinePositioned m -> LinePositioned m -> Bool # stripPrefix :: LinePositioned m -> LinePositioned m -> Maybe (LinePositioned m) #
(StableFactorial m, TextualMonoid m, RightReductive m) => RightReductive (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods isSuffixOf :: LinePositioned m -> LinePositioned m -> Bool # stripSuffix :: LinePositioned m -> LinePositioned m -> Maybe (LinePositioned m) #
(StableFactorial m, TextualMonoid m) => Factorial (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned Methods factors :: LinePositioned m -> [LinePositioned m] # primePrefix :: LinePositioned m -> LinePositioned m # primeSuffix :: LinePositioned m -> LinePositioned m # foldl :: (a -> LinePositioned m -> a) -> a -> LinePositioned m -> a # foldl' :: (a -> LinePositioned m -> a) -> a -> LinePositioned m -> a # foldr :: (LinePositioned m -> a -> a) -> a -> LinePositioned m -> a # length :: LinePositioned m -> Int # foldMap :: Monoid n => (LinePositioned m -> n) -> LinePositioned m -> n # reverse :: LinePositioned m -> LinePositioned m #
(StableFactorial m, TextualMonoid m) => StableFactorial (LinePositioned m) # |
Instance details Defined in Data.Monoid.Instances.Positioned

extract :: Positioned p => p a -> a #

position :: Positioned p => p a -> Int #

line :: LinePositioned m -> Int #

the current line

column :: LinePositioned m -> Int #

the current column