Ticket #5469: 0002-Remove-TH.Syntax.Internals.patch

File 0002-Remove-TH.Syntax.Internals.patch, 4.2 KB (added by reinerp, 3 years ago)
  • Language/Haskell/TH/Syntax.hs

    From e87eb5844ea511c3c41f446b27b3149c0b09726a Mon Sep 17 00:00:00 2001
    From: Reiner Pope <[email protected]>
    Date: Sat, 9 Jun 2012 16:26:52 +1000
    Subject: [PATCH 2/4] Remove TH.Syntax.Internals.
    
    ---
     Language/Haskell/TH/Syntax.hs           |   45 +++++++------------------------
     Language/Haskell/TH/Syntax/Internals.hs |   29 --------------------
     template-haskell.cabal                  |    1 -
     3 files changed, 10 insertions(+), 65 deletions(-)
     delete mode 100644 Language/Haskell/TH/Syntax/Internals.hs
    
    diff --git a/Language/Haskell/TH/Syntax.hs b/Language/Haskell/TH/Syntax.hs
    index e7a72a8..3d55f59 100644
    a b  
    2020-- 
    2121----------------------------------------------------------------------------- 
    2222 
    23 module Language.Haskell.TH.Syntax( 
    24         Quasi(..), Lift(..), liftString, 
    25  
    26         Q, runQ,  
    27         report, recover, reify,  
    28         lookupTypeName, lookupValueName, 
    29         location, runIO, addDependentFile, 
    30         isInstance, reifyInstances, 
    31  
    32         -- * Names 
    33         Name(..), mkName, newName, nameBase, nameModule, 
    34         showName, showName', NameIs(..), 
    35  
    36         -- * The algebraic data types 
    37         -- $infix 
    38         Dec(..), Exp(..), Con(..), Type(..), TyVarBndr(..), Kind, Cxt, 
    39         TyLit(..), 
    40         Pred(..), Match(..),  Clause(..), Body(..), Guard(..), Stmt(..), 
    41         Range(..), Lit(..), Pat(..), FieldExp, FieldPat,  
    42         Strict(..), Foreign(..), Callconv(..), Safety(..), Pragma(..), 
    43         Inline(..), InlineSpec(..), StrictType, VarStrictType, FunDep(..), 
    44         FamFlavour(..), Info(..), Loc(..), CharPos, 
    45         Fixity(..), FixityDirection(..), defaultFixity, maxPrecedence, 
    46  
    47         -- * Internal functions 
    48         returnQ, bindQ, sequenceQ, 
    49         NameFlavour(..), NameSpace (..),  
    50         mkNameG_v, mkNameG_d, mkNameG_tc, Uniq, mkNameL, mkNameU, 
    51         tupleTypeName, tupleDataName, 
    52         unboxedTupleTypeName, unboxedTupleDataName, 
    53         OccName, mkOccName, occString, 
    54         ModName, mkModName, modString, 
    55         PkgName, mkPkgName, pkgString 
    56     ) where 
     23module Language.Haskell.TH.Syntax where 
    5724 
    5825import GHC.Base         ( Int(..), Int#, (<#), (==#) ) 
    5926 
    60 import Language.Haskell.TH.Syntax.Internals 
    6127import Data.Data (Data(..), Typeable, mkConstr, mkDataType, constrIndex) 
    6228import qualified Data.Data as Data 
    6329import Control.Applicative( Applicative(..) ) 
    rightName = mkNameG DataName "base" "Data.Either" "Right" 
    460426--              Names and uniques  
    461427----------------------------------------------------- 
    462428 
     429newtype ModName = ModName String        -- Module name 
     430 deriving (Eq,Ord,Typeable,Data) 
     431 
     432newtype PkgName = PkgName String        -- package name 
     433 deriving (Eq,Ord,Typeable,Data) 
     434 
     435newtype OccName = OccName String 
     436 deriving (Eq,Ord,Typeable,Data) 
     437 
    463438mkModName :: String -> ModName 
    464439mkModName s = ModName s 
    465440 
  • deleted file Language/Haskell/TH/Syntax/Internals.hs

    diff --git a/Language/Haskell/TH/Syntax/Internals.hs b/Language/Haskell/TH/Syntax/Internals.hs
    deleted file mode 100644
    index ea85fd0..0000000
    + -  
    1 {-# LANGUAGE GeneralizedNewtypeDeriving,DeriveDataTypeable #-} 
    2 ----------------------------------------------------------------------------- 
    3 -- | 
    4 -- Module      :  Language.Haskell.Syntax.Internals 
    5 -- Copyright   :  (c) The University of Glasgow 2009 
    6 -- License     :  BSD-style (see the file libraries/base/LICENSE) 
    7 --  
    8 -- Maintainer  :  [email protected] 
    9 -- Stability   :  experimental 
    10 -- Portability :  portable 
    11 -- 
    12 -- Abstract syntax definitions for Template Haskell. 
    13 -- 
    14 ----------------------------------------------------------------------------- 
    15  
    16 module Language.Haskell.TH.Syntax.Internals ( 
    17     ModName(..), PkgName(..), OccName(..) 
    18  ) where 
    19  
    20 import Data.Data 
    21  
    22 newtype ModName = ModName String        -- Module name 
    23  deriving (Eq,Ord,Typeable,Data) 
    24  
    25 newtype PkgName = PkgName String        -- package name 
    26  deriving (Eq,Ord,Typeable,Data) 
    27  
    28 newtype OccName = OccName String 
    29  deriving (Eq,Ord,Typeable,Data) 
  • template-haskell.cabal

    diff --git a/template-haskell.cabal b/template-haskell.cabal
    index 5c26196..471a267 100644
    a b Library 
    1313    build-depends: base >= 4.2 && < 5, 
    1414                   pretty, containers 
    1515    exposed-modules: 
    16         Language.Haskell.TH.Syntax.Internals 
    1716        Language.Haskell.TH.Syntax 
    1817        Language.Haskell.TH.PprLib 
    1918        Language.Haskell.TH.Ppr