From 461e147a809544fc41d7c491d6789fa290f82a31 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Mon, 12 Dec 2016 15:04:06 +0100 Subject: [PATCH] Revert "Make the fields of SrcLoc and SrcSpan strict" This caused bad performance regressions, see #340 This reverts commit a388dde3a223219a9e911bdb2edf9d8cce054bdb. --- src/Language/Haskell/Exts/SrcLoc.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Language/Haskell/Exts/SrcLoc.hs b/src/Language/Haskell/Exts/SrcLoc.hs index 81c92a9f..d11c8b21 100644 --- a/src/Language/Haskell/Exts/SrcLoc.hs +++ b/src/Language/Haskell/Exts/SrcLoc.hs @@ -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) @@ -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)