Skip to content

Commit

Permalink
Revert "Make the fields of SrcLoc and SrcSpan strict"
Browse files Browse the repository at this point in the history
This caused bad performance regressions, see haskell-suite#340

This reverts commit a388dde.
  • Loading branch information
mpickering committed Dec 12, 2016
1 parent 1817310 commit 461e147
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Language/Haskell/Exts/SrcLoc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import GHC.Generics (Generic)

-- | A single position in the source.
data SrcLoc = SrcLoc
{ srcFilename :: !String
, srcLine :: !Int
, srcColumn :: !Int
{ srcFilename :: String
, srcLine :: Int
, srcColumn :: Int
}
deriving (Eq,Ord,Typeable,Data,Generic)

Expand All @@ -36,11 +36,11 @@ noLoc = SrcLoc "" (-1) (-1)

-- | A portion of the source, spanning one or more lines and zero or more columns.
data SrcSpan = SrcSpan
{ srcSpanFilename :: !String
, srcSpanStartLine :: !Int
, srcSpanStartColumn :: !Int
, srcSpanEndLine :: !Int
, srcSpanEndColumn :: !Int
{ srcSpanFilename :: String
, srcSpanStartLine :: Int
, srcSpanStartColumn :: Int
, srcSpanEndLine :: Int
, srcSpanEndColumn :: Int
}
deriving (Eq,Ord,Typeable,Data)

Expand Down

0 comments on commit 461e147

Please sign in to comment.