packages feed

loc 0.1.0.2 → 0.1.1.0

raw patch · 3 files changed

+32/−13 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Loc: locColumn :: Loc -> Column
+ Data.Loc: locLine :: Loc -> Line

Files

loc.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:           loc-version:        0.1.0.2+version:        0.1.1.0 synopsis:       Types representing line and column positions and ranges in text files.  description:    The package name /loc/ stands for “location” and is also an allusion to the
src/Data/Loc.hs view
@@ -10,15 +10,26 @@     Line, Column, Loc, Span, Area    -- * Constructing-  , loc, origin, spanFromTo, spanFromToMay, areaFromTo, spanArea+  -- ** Loc+  , loc, origin+  -- ** Span+  , spanFromTo, spanFromToMay+  -- ** Area+  , areaFromTo, spanArea    -- * Deconstructing-  , areaSpansAsc+  -- ** Loc+  , locLine, locColumn+  -- ** Span   , spanStart, spanEnd+  -- ** Area+  , areaSpansAsc    -- * Combining-  , areaUnion, areaDifference+  -- ** Span   , spanUnion, spanDifference+  -- ** Area+  , areaUnion, areaDifference    -- * Miscellaneous   , Pos, OneToTwo, ZeroToTwo, ToNat (..), LocException (..)@@ -35,8 +46,8 @@ import Data.Loc.Pos (Column, Line, Pos, ToNat (..)) import Data.Loc.Span (Span) -import qualified Data.Loc.Loc as Loc import qualified Data.Loc.Area as Area+import qualified Data.Loc.Loc as Loc import qualified Data.Loc.Span as Span  {- |@@ -54,6 +65,14 @@ -} loc :: Line -> Column -> Loc loc = Loc.loc++-- | /This is an alias for 'Loc.line'./+locLine :: Loc -> Line+locLine = Loc.line++-- | /This is an alias for 'Loc.column'./+locColumn :: Loc -> Column+locColumn = Loc.column  {- | Attempt to construct a 'Span' from two 'Loc's. The lesser loc will be the
src/Data/Loc/Internal/Prelude.hs view
@@ -13,8 +13,8 @@ import Data.Char (Char) import Data.Eq as X (Eq (..)) import Data.Foldable as X (Foldable (..), foldMap, traverse_)-import Data.Function as X (flip, id, on, ($), (&), (.), const)-import Data.Functor as X (Functor (..), ($>), (<$), (<$>), void)+import Data.Function as X (const, flip, id, on, ($), (&), (.))+import Data.Functor as X (Functor (..), void, ($>), (<$), (<$>)) import Data.List.NonEmpty as X (NonEmpty (..)) import Data.Map as X (Map) import Data.Maybe as X (Maybe (..), catMaybes, maybe)@@ -25,15 +25,15 @@ import Data.Traversable as X (mapAccumL, sequenceA, traverse) import Data.Tuple as X (fst, snd) import Numeric.Natural as X (Natural)-import Prelude as X (Double, Enum (..), Int, Integral, Real (..), div,+import Prelude as X (Double, Enum (..), Int, Integral, Real (..), String, div,                      fromIntegral, print, quotRem, round, sqrt, toInteger,-                     undefined, (/), String)+                     undefined, (/)) import System.Exit as X (exitFailure) import System.IO as X (IO)-import Text.ParserCombinators.ReadPrec as X (readP_to_Prec, readPrec_to_S,-  minPrec)-import Text.Read as X (Read (..), read, ReadPrec)-import Text.Show as X (Show (..), showString, shows, ShowS)+import Text.ParserCombinators.ReadPrec as X (minPrec, readP_to_Prec,+                                             readPrec_to_S)+import Text.Read as X (Read (..), ReadPrec, read)+import Text.Show as X (Show (..), ShowS, showString, shows)  import qualified Text.ParserCombinators.ReadP as ReadP