srcloc 0.4.0 → 0.4.1
raw patch · 4 files changed
+31/−17 lines, 4 filessetup-changed
Files
- Data/Loc.hs +25/−10
- LICENSE +1/−1
- Setup.hs +0/−1
- srcloc.cabal +5/−5
Data/Loc.hs view
@@ -1,12 +1,12 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveDataTypeable #-}+ -- | -- Module : Data.Loc -- Copyright : (c) Harvard University 2006-2011--- (c) Geoffrey Mainland 2011-2012+-- (c) Geoffrey Mainland 2011-2014 -- License : BSD-style--- Maintainer : mainland@eecs.harvard.edu--{-# LANGUAGE CPP #-}-{-# LANGUAGE DeriveDataTypeable #-}+-- Maintainer : Geoffrey Mainland <mainland@cs.drexel.edu> module Data.Loc ( Pos(..),@@ -53,9 +53,9 @@ {-# UNPACK #-} !Int {-# UNPACK #-} !Int #ifdef __GLASGOW_HASKELL__- deriving (Eq, Show, Data, Typeable)+ deriving (Eq, Read, Show, Data, Typeable) #else- deriving (Eq, Show)+ deriving (Eq, Read, Show) #endif instance Ord Pos where@@ -103,9 +103,9 @@ Loc {-# UNPACK #-} !Pos {-# UNPACK #-} !Pos #ifdef __GLASGOW_HASKELL__- deriving (Eq, Show, Data, Typeable)+ deriving (Eq, Read, Show, Data, Typeable) #else- deriving (Eq, Show)+ deriving (Eq, Read, Show) #endif -- | Starting position of the location.@@ -143,7 +143,22 @@ compare _ _ = EQ instance Show SrcLoc where- showsPrec _ _ = id+ showsPrec _ _ = showString "noLoc"++instance Read SrcLoc where+ readsPrec p s =+ readParen False+ (\s -> [(SrcLoc NoLoc, s') |+ ("noLoc", s') <- lex s])+ s+ +++ readParen (p > app_prec)+ (\s -> [(SrcLoc l, s'') |+ ("SrcLoc", s') <- lex s,+ (l, s'') <- readsPrec (app_prec+1) s'])+ s+ where+ app_prec = 10 -- | The 'SrcLoc' of a 'Located' value. srclocOf :: Located a => a -> SrcLoc
LICENSE view
@@ -25,7 +25,7 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Copyright (c) 2011-2012, Geoffrey Mainland+Copyright (c) 2011-2014, Geoffrey Mainland All rights reserved. Redistribution and use in source and binary forms, with or without modification,
Setup.hs view
@@ -1,3 +1,2 @@ import Distribution.Simple- main = defaultMain
srcloc.cabal view
@@ -1,14 +1,14 @@ name: srcloc-version: 0.4.0+version: 0.4.1 cabal-version: >= 1.6 license: BSD3 license-file: LICENSE copyright: (c) 2006-2011 Harvard University- (c) 2011-2012 Geoffrey Mainland-author: Geoffrey Mainland <mainland@eecs.harvard.edu>-maintainer: mainland@eecs.harvard.edu+ (c) 2011-2014 Geoffrey Mainland+author: Geoffrey Mainland <mainland@cs.drexel.edu>+maintainer: Geoffrey Mainland <mainland@cs.drexel.edu> stability: alpha-homepage: http://www.eecs.harvard.edu/~mainland/+homepage: http://www.cs.drexel.edu/~mainland/ category: Data synopsis: Data types for managing source code locations. description: Data types for managing source code locations.