module Refact.Types where
import Data.Data
data SrcSpan = SrcSpan
{ startLine :: !Int
, startCol :: !Int
, endLine :: !Int
, endCol :: !Int }
deriving (Read, Show, Eq, Ord, Data, Typeable)
data RType = Expr | Decl | Type | Pattern | Stmt | ModuleName | Bind | Match | Import
deriving (Read, Ord, Show, Eq, Data, Typeable)
data Refactoring a =
Replace {
rtype :: RType
, pos :: a
, subts :: [(String, a)]
, orig :: String
}
| ModifyComment {
pos :: a
, newComment :: String
}
| InsertComment {
pos :: a
, newComment :: String
}
| Delete {
rtype :: RType
, pos :: a
}
|
RemoveAsKeyword
{
pos :: a
}
deriving (Show, Read, Functor, Eq, Ord, Data, Typeable )