-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Specify refactorings to perform with apply-refact
--   
--   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.
@package refact
@version 0.3.0.2

module Refact.Types

-- | A generic SrcSpan, usually this is converted immediately to a native
--   representation. (For example a GHC SrcSpan or a HSE SrcSpan)
data SrcSpan
SrcSpan :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> SrcSpan
[startLine] :: SrcSpan -> {-# UNPACK #-} !Int
[startCol] :: SrcSpan -> {-# UNPACK #-} !Int
[endLine] :: SrcSpan -> {-# UNPACK #-} !Int
[endCol] :: SrcSpan -> {-# UNPACK #-} !Int

-- | Types of expressions which we are able to replace.
data RType
Expr :: RType
Decl :: RType
Type :: RType
Pattern :: RType
Stmt :: RType
ModuleName :: RType
Bind :: RType
Match :: RType
Import :: RType

-- | Supported refactorings
data Refactoring a
Replace :: RType -> a -> [(String, a)] -> String -> Refactoring a

-- | Type of expression to be replaced
[rtype] :: Refactoring a -> RType

-- | Expression to replace
[pos] :: Refactoring a -> a

-- | Substitutions to make
[subts] :: Refactoring a -> [(String, a)]

-- | Replacement template
[orig] :: Refactoring a -> String
ModifyComment :: a -> String -> Refactoring a

-- | Expression to replace
[pos] :: Refactoring a -> a
[newComment] :: Refactoring a -> String
InsertComment :: a -> String -> Refactoring a

-- | Expression to replace
[pos] :: Refactoring a -> a
[newComment] :: Refactoring a -> String
Delete :: RType -> a -> Refactoring a

-- | Type of expression to be replaced
[rtype] :: Refactoring a -> RType

-- | Expression to replace
[pos] :: Refactoring a -> a

-- | Takes the position of a import decl and removes the as keyword
RemoveAsKeyword :: a -> Refactoring a

-- | Expression to replace
[pos] :: Refactoring a -> a
instance Data.Data.Data a => Data.Data.Data (Refact.Types.Refactoring a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Refact.Types.Refactoring a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Refact.Types.Refactoring a)
instance GHC.Base.Functor Refact.Types.Refactoring
instance GHC.Read.Read a => GHC.Read.Read (Refact.Types.Refactoring a)
instance GHC.Show.Show a => GHC.Show.Show (Refact.Types.Refactoring a)
instance Data.Data.Data Refact.Types.RType
instance GHC.Classes.Eq Refact.Types.RType
instance GHC.Show.Show Refact.Types.RType
instance GHC.Classes.Ord Refact.Types.RType
instance GHC.Read.Read Refact.Types.RType
instance Data.Data.Data Refact.Types.SrcSpan
instance GHC.Classes.Ord Refact.Types.SrcSpan
instance GHC.Classes.Eq Refact.Types.SrcSpan
instance GHC.Show.Show Refact.Types.SrcSpan
instance GHC.Read.Read Refact.Types.SrcSpan
