file-location 0.2.1 → 0.2.2
raw patch · 5 files changed
+19/−17 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ FileLocation: locationToString :: Loc -> String
Files
- Debug/FileLocation.hs +1/−1
- FileLocation.hs +4/−3
- FileLocation/Internal.hs +0/−11
- FileLocation/LocationString.hs +12/−0
- file-location.cabal +2/−2
Debug/FileLocation.hs view
@@ -5,7 +5,7 @@ import Language.Haskell.TH.Syntax import Debug.Trace-import FileLocation.Internal (locationToString)+import FileLocation.LocationString (locationToString) -- | A version of Debug.Trace.trace that just prints a value. -- This should be included in Debug.Trace
FileLocation.hs view
@@ -1,12 +1,13 @@ {-# LANGUAGE TemplateHaskell #-} -- | see Debug.FileLocation module for more definitions module FileLocation- (err, undef,- debug, debugM, debugMsg, dbg, dbgMsg, trc, ltrace, ltraceM, strace+ ( err, undef+ , debug, debugM, debugMsg, dbg, dbgMsg, trc, ltrace, ltraceM, strace+ , locationToString ) where -import FileLocation.Internal (locationToString)+import FileLocation.LocationString (locationToString) import Debug.FileLocation (debug, debugM, debugMsg, dbg, dbgMsg, trc, ltrace, ltraceM, strace) import Debug.Trace (trace) -- future plans
− FileLocation/Internal.hs
@@ -1,11 +0,0 @@-module FileLocation.Internal (locationToString) where--import Language.Haskell.TH.Syntax---- leaving out the loc_end parameter-locationToString :: Loc -> String-locationToString loc = (loc_package loc) ++ ':' : (loc_module loc) ++ - ' ' : (loc_filename loc) ++ ':' : (line loc) ++ ':' : (char loc)- where- line = show . fst . loc_start- char = show . snd . loc_start
+ FileLocation/LocationString.hs view
@@ -0,0 +1,12 @@+module FileLocation.LocationString (locationToString) where++import Language.Haskell.TH.Syntax++-- turn the TH Loc loaction information into a human readable string+-- leaving out the loc_end parameter+locationToString :: Loc -> String+locationToString loc = (loc_package loc) ++ ':' : (loc_module loc) ++ + ' ' : (loc_filename loc) ++ ':' : (line loc) ++ ':' : (char loc)+ where+ line = show . fst . loc_start+ char = show . snd . loc_start
file-location.cabal view
@@ -1,5 +1,5 @@ Name: file-location-Version: 0.2.1+Version: 0.2.2 Synopsis: common functions that show file location information Homepage: https://github.com/gregwebs/ErrorLocation.hs License: BSD3@@ -41,7 +41,7 @@ Library Exposed-modules: FileLocation, Debug.FileLocation- Other-modules: FileLocation.Internal+ Other-modules: FileLocation.LocationString -- Packages needed in order to build this package. Build-depends: base >= 4 && < 5,