refact 0.1.0.0 → 0.2.0.0
raw patch · 3 files changed
+18/−7 lines, 3 filesdep ~base
Dependency ranges changed: base
Files
- CHANGELOG +6/−1
- refact.cabal +2/−2
- src/Refact/Types.hs +10/−4
CHANGELOG view
@@ -1,3 +1,8 @@+# 0.2++* Changed representation of SrcSpan as suggested by #1.+* Added Data and Typeable instances.+ # 0.1 -Initial Release+* Initial Release
refact.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: refact-version: 0.1.0.0+version: 0.2.0.0 synopsis: Specify refactorings to perform with apply-refact description: This library provides a datatype which can be interpreted by apply-refact. It exists as a seperate library so that applications can specify refactorings without depending on GHC.@@ -21,7 +21,7 @@ exposed-modules: Refact.Types -- other-modules: -- other-extensions:- build-depends: base >=4.8 && <4.9+ build-depends: base >=4 && <59 hs-source-dirs: src default-language: Haskell2010
src/Refact/Types.hs view
@@ -1,15 +1,21 @@ {-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE DeriveDataTypeable #-} module Refact.Types where +import Data.Data+ -- | A generic SrcSpan, usually this is converted immediately to a native -- representation. (For example a GHC SrcSpan or a HSE SrcSpan) data SrcSpan = SrcSpan- { start :: (Int, Int)- , end :: (Int, Int) } deriving (Read, Show, Eq, Ord)+ { startLine :: {-# UNPACK #-} !Int+ , startCol :: {-# UNPACK #-} !Int+ , endLine :: {-# UNPACK #-} !Int+ , endCol :: {-# UNPACK #-} !Int }+ deriving (Read, Show, Eq, Ord, Data, Typeable) -- | Types of expressions which we are able to replace.-data RType = Expr | Decl | Type | Pattern | Stmt | ModuleName | Bind | Match deriving (Read, Ord, Show, Eq)+data RType = Expr | Decl | Type | Pattern | Stmt | ModuleName | Bind | Match deriving (Read, Ord, Show, Eq, Data, Typeable) -- | Supported refactorings data Refactoring a =@@ -36,7 +42,7 @@ -- | Rename { -- nameSubts :: [(String, String)] -- }- deriving (Show, Read, Functor, Eq, Ord)+ deriving (Show, Read, Functor, Eq, Ord, Data, Typeable )