diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-07-16 17:43:44 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-07-16 17:43:44 +0100 |
commit | 18d48b496bf32b444d37abfb561f5aa2ab33c093 (patch) | |
tree | efc958f4728a6c9eae8ac418b26daf4ab04b45e9 | |
parent | d27c4541937219b60551a75662df805f0e6e54a1 (diff) | |
download | haskell-18d48b496bf32b444d37abfb561f5aa2ab33c093.tar.gz |
Remove Language.Haskell.TH.Syntax.Internals
It didn't contain much, and the approved import route is Language.Haskell.TH,
so in effect the Syntax module is already an internal one.
Thanks to Reiner Pope.
3 files changed, 10 insertions, 65 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs index 8e18c529ac..7c871e80d4 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs @@ -20,44 +20,10 @@ -- ----------------------------------------------------------------------------- -module Language.Haskell.TH.Syntax( - Quasi(..), Lift(..), liftString, - - Q, runQ, - report, recover, reify, - lookupTypeName, lookupValueName, - location, runIO, addDependentFile, - isInstance, reifyInstances, - - -- * Names - Name(..), mkName, newName, nameBase, nameModule, - showName, showName', NameIs(..), - - -- * The algebraic data types - -- $infix - Dec(..), Exp(..), Con(..), Type(..), TyVarBndr(..), Kind, Cxt, - TyLit(..), - Pred(..), Match(..), Clause(..), Body(..), Guard(..), Stmt(..), - Range(..), Lit(..), Pat(..), FieldExp, FieldPat, - Strict(..), Foreign(..), Callconv(..), Safety(..), Pragma(..), - Inline(..), InlineSpec(..), StrictType, VarStrictType, FunDep(..), - FamFlavour(..), Info(..), Loc(..), CharPos, - Fixity(..), FixityDirection(..), defaultFixity, maxPrecedence, - - -- * Internal functions - returnQ, bindQ, sequenceQ, - NameFlavour(..), NameSpace (..), - mkNameG_v, mkNameG_d, mkNameG_tc, Uniq, mkNameL, mkNameU, - tupleTypeName, tupleDataName, - unboxedTupleTypeName, unboxedTupleDataName, - OccName, mkOccName, occString, - ModName, mkModName, modString, - PkgName, mkPkgName, pkgString - ) where +module Language.Haskell.TH.Syntax where import GHC.Base ( Int(..), Int#, (<#), (==#) ) -import Language.Haskell.TH.Syntax.Internals import Data.Data (Data(..), Typeable, mkConstr, mkDataType, constrIndex) import qualified Data.Data as Data import Control.Applicative( Applicative(..) ) @@ -461,6 +427,15 @@ rightName = mkNameG DataName "base" "Data.Either" "Right" -- Names and uniques ----------------------------------------------------- +newtype ModName = ModName String -- Module name + deriving (Eq,Ord,Typeable,Data) + +newtype PkgName = PkgName String -- package name + deriving (Eq,Ord,Typeable,Data) + +newtype OccName = OccName String + deriving (Eq,Ord,Typeable,Data) + mkModName :: String -> ModName mkModName s = ModName s diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax/Internals.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax/Internals.hs deleted file mode 100644 index ea85fd027f..0000000000 --- a/libraries/template-haskell/Language/Haskell/TH/Syntax/Internals.hs +++ /dev/null @@ -1,29 +0,0 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving,DeriveDataTypeable #-} ------------------------------------------------------------------------------ --- | --- Module : Language.Haskell.Syntax.Internals --- Copyright : (c) The University of Glasgow 2009 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : experimental --- Portability : portable --- --- Abstract syntax definitions for Template Haskell. --- ------------------------------------------------------------------------------ - -module Language.Haskell.TH.Syntax.Internals ( - ModName(..), PkgName(..), OccName(..) - ) where - -import Data.Data - -newtype ModName = ModName String -- Module name - deriving (Eq,Ord,Typeable,Data) - -newtype PkgName = PkgName String -- package name - deriving (Eq,Ord,Typeable,Data) - -newtype OccName = OccName String - deriving (Eq,Ord,Typeable,Data) diff --git a/libraries/template-haskell/template-haskell.cabal b/libraries/template-haskell/template-haskell.cabal index 5c26196d0a..471a267601 100644 --- a/libraries/template-haskell/template-haskell.cabal +++ b/libraries/template-haskell/template-haskell.cabal @@ -13,7 +13,6 @@ Library build-depends: base >= 4.2 && < 5, pretty, containers exposed-modules: - Language.Haskell.TH.Syntax.Internals Language.Haskell.TH.Syntax Language.Haskell.TH.PprLib Language.Haskell.TH.Ppr |