| 1 | Mon May 18 13:09:03 BST 2009 Simon Marlow <marlowsd@gmail.com> |
|---|
| 2 | * abstractify ModName, PkgName and OccName; drop dependency on packedstring |
|---|
| 3 | |
|---|
| 4 | New patches: |
|---|
| 5 | |
|---|
| 6 | [abstractify ModName, PkgName and OccName; drop dependency on packedstring |
|---|
| 7 | Simon Marlow <marlowsd@gmail.com>**20090518120903 |
|---|
| 8 | Ignore-this: 72eecae0e69859c56ae0125e5c5262f8 |
|---|
| 9 | ] { |
|---|
| 10 | adddir ./Language/Haskell/TH/Syntax |
|---|
| 11 | hunk ./Language/Haskell/TH/Syntax.hs 52 |
|---|
| 12 | PkgName, mkPkgName, pkgString |
|---|
| 13 | ) where |
|---|
| 14 | |
|---|
| 15 | -import Data.PackedString |
|---|
| 16 | import GHC.Base ( Int(..), Int#, (<#), (==#) ) |
|---|
| 17 | |
|---|
| 18 | hunk ./Language/Haskell/TH/Syntax.hs 54 |
|---|
| 19 | +import Language.Haskell.TH.Syntax.Internals |
|---|
| 20 | import Data.Data (Data(..), Typeable, mkConstr, mkDataType, constrIndex) |
|---|
| 21 | import qualified Data.Data as Data |
|---|
| 22 | import Data.IORef |
|---|
| 23 | hunk ./Language/Haskell/TH/Syntax.hs 285 |
|---|
| 24 | -- Names and uniques |
|---|
| 25 | ----------------------------------------------------- |
|---|
| 26 | |
|---|
| 27 | -type ModName = PackedString -- Module name |
|---|
| 28 | - |
|---|
| 29 | mkModName :: String -> ModName |
|---|
| 30 | hunk ./Language/Haskell/TH/Syntax.hs 286 |
|---|
| 31 | -mkModName s = packString s |
|---|
| 32 | +mkModName s = ModName s |
|---|
| 33 | |
|---|
| 34 | modString :: ModName -> String |
|---|
| 35 | hunk ./Language/Haskell/TH/Syntax.hs 289 |
|---|
| 36 | -modString m = unpackPS m |
|---|
| 37 | - |
|---|
| 38 | +modString (ModName m) = m |
|---|
| 39 | |
|---|
| 40 | hunk ./Language/Haskell/TH/Syntax.hs 291 |
|---|
| 41 | -type PkgName = PackedString -- package name |
|---|
| 42 | |
|---|
| 43 | mkPkgName :: String -> PkgName |
|---|
| 44 | hunk ./Language/Haskell/TH/Syntax.hs 293 |
|---|
| 45 | -mkPkgName s = packString s |
|---|
| 46 | +mkPkgName s = PkgName s |
|---|
| 47 | |
|---|
| 48 | pkgString :: PkgName -> String |
|---|
| 49 | hunk ./Language/Haskell/TH/Syntax.hs 296 |
|---|
| 50 | -pkgString m = unpackPS m |
|---|
| 51 | +pkgString (PkgName m) = m |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | ----------------------------------------------------- |
|---|
| 55 | hunk ./Language/Haskell/TH/Syntax.hs 303 |
|---|
| 56 | -- OccName |
|---|
| 57 | ----------------------------------------------------- |
|---|
| 58 | |
|---|
| 59 | -type OccName = PackedString |
|---|
| 60 | - |
|---|
| 61 | mkOccName :: String -> OccName |
|---|
| 62 | hunk ./Language/Haskell/TH/Syntax.hs 304 |
|---|
| 63 | -mkOccName s = packString s |
|---|
| 64 | +mkOccName s = OccName s |
|---|
| 65 | |
|---|
| 66 | occString :: OccName -> String |
|---|
| 67 | hunk ./Language/Haskell/TH/Syntax.hs 307 |
|---|
| 68 | -occString occ = unpackPS occ |
|---|
| 69 | +occString (OccName occ) = occ |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | ----------------------------------------------------- |
|---|
| 73 | addfile ./Language/Haskell/TH/Syntax/Internals.hs |
|---|
| 74 | hunk ./Language/Haskell/TH/Syntax/Internals.hs 1 |
|---|
| 75 | +{-# LANGUAGE GeneralizedNewtypeDeriving,DeriveDataTypeable #-} |
|---|
| 76 | +----------------------------------------------------------------------------- |
|---|
| 77 | +-- | |
|---|
| 78 | +-- Module : Language.Haskell.Syntax.Internals |
|---|
| 79 | +-- Copyright : (c) The University of Glasgow 2009 |
|---|
| 80 | +-- License : BSD-style (see the file libraries/base/LICENSE) |
|---|
| 81 | +-- |
|---|
| 82 | +-- Maintainer : libraries@haskell.org |
|---|
| 83 | +-- Stability : experimental |
|---|
| 84 | +-- Portability : portable |
|---|
| 85 | +-- |
|---|
| 86 | +-- Abstract syntax definitions for Template Haskell. |
|---|
| 87 | +-- |
|---|
| 88 | +----------------------------------------------------------------------------- |
|---|
| 89 | + |
|---|
| 90 | +module Language.Haskell.TH.Syntax.Internals ( |
|---|
| 91 | + ModName(..), PkgName(..), OccName(..) |
|---|
| 92 | + ) where |
|---|
| 93 | + |
|---|
| 94 | +import Data.Typeable |
|---|
| 95 | +import Data.Data |
|---|
| 96 | + |
|---|
| 97 | +newtype ModName = ModName String -- Module name |
|---|
| 98 | + deriving (Eq,Ord,Typeable,Data) |
|---|
| 99 | + |
|---|
| 100 | +newtype PkgName = PkgName String -- package name |
|---|
| 101 | + deriving (Eq,Ord,Typeable,Data) |
|---|
| 102 | + |
|---|
| 103 | +newtype OccName = OccName String |
|---|
| 104 | + deriving (Eq,Ord,Typeable,Data) |
|---|
| 105 | hunk ./template-haskell.cabal 2 |
|---|
| 106 | name: template-haskell |
|---|
| 107 | -version: 2.3.0.0 |
|---|
| 108 | +version: 2.4.0.0 |
|---|
| 109 | license: BSD3 |
|---|
| 110 | license-file: LICENSE |
|---|
| 111 | maintainer: libraries@haskell.org |
|---|
| 112 | hunk ./template-haskell.cabal 13 |
|---|
| 113 | Cabal-Version: >= 1.6 |
|---|
| 114 | |
|---|
| 115 | Library |
|---|
| 116 | - build-depends: base, pretty, packedstring, containers |
|---|
| 117 | + build-depends: base, pretty, containers |
|---|
| 118 | exposed-modules: |
|---|
| 119 | hunk ./template-haskell.cabal 15 |
|---|
| 120 | + Language.Haskell.TH.Syntax.Internals |
|---|
| 121 | Language.Haskell.TH.Syntax |
|---|
| 122 | Language.Haskell.TH.PprLib |
|---|
| 123 | Language.Haskell.TH.Ppr |
|---|
| 124 | } |
|---|
| 125 | |
|---|
| 126 | Context: |
|---|
| 127 | |
|---|
| 128 | [Add liftString, to match the "improve lifting for strings" patch in the compiler |
|---|
| 129 | simonpj@microsoft.com**20090527180613 |
|---|
| 130 | Ignore-this: 2096d87c13ee904932362b8e8c4892ba |
|---|
| 131 | ] |
|---|
| 132 | [Added bang patterns |
|---|
| 133 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090326100706 |
|---|
| 134 | Ignore-this: 30dd82e3eeac529fdddafd87be6164b4 |
|---|
| 135 | ] |
|---|
| 136 | [Template Haskell: kind annotations |
|---|
| 137 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090326093236 |
|---|
| 138 | Ignore-this: bfa56c07445855d52c7cedd849071630 |
|---|
| 139 | - Kind annotations at variables in type declarations |
|---|
| 140 | - Kind signatures in types |
|---|
| 141 | |
|---|
| 142 | *** This patch changes the API! Existing client code will break! *** |
|---|
| 143 | ] |
|---|
| 144 | [Added INLINE and SPECIALISE pragmas as declaration forms |
|---|
| 145 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090324233521 |
|---|
| 146 | Ignore-this: bab99fb3df6e41993ddce3786d980546 |
|---|
| 147 | ] |
|---|
| 148 | [Adding equality constraints |
|---|
| 149 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090319131054 |
|---|
| 150 | Ignore-this: fabdcf21bf536bbc5a16f6868e2177ea |
|---|
| 151 | - This patch adds equality constraints |
|---|
| 152 | - This requires an incompatible change of the type TH.Cxt - hence: |
|---|
| 153 | |
|---|
| 154 | *** This patch changes the API! Existing client code will break! *** |
|---|
| 155 | |
|---|
| 156 | - I took the opportunity to sanitise the definition of contexts a bit. |
|---|
| 157 | ] |
|---|
| 158 | [Added type family declarations forms |
|---|
| 159 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090319054003 |
|---|
| 160 | Ignore-this: c280194ef348c681b942d1f76db56d21 |
|---|
| 161 | - Adds type family and instance declarations, both on the top level and |
|---|
| 162 | as associated types |
|---|
| 163 | - No equality constraints yet |
|---|
| 164 | ] |
|---|
| 165 | [get unsafePerformIO from a documented location |
|---|
| 166 | Simon Marlow <marlowsd@gmail.com>**20090121212755] |
|---|
| 167 | [Require Cabal version >= 1.6 |
|---|
| 168 | Ian Lynagh <igloo@earth.li>**20090122011329] |
|---|
| 169 | [Add "bug-reports" and "source-repository" info to the Cabal file |
|---|
| 170 | Ian Lynagh <igloo@earth.li>**20090121182826 |
|---|
| 171 | Also switched to the modern Cabal file format |
|---|
| 172 | ] |
|---|
| 173 | [#2875: Correct SYB's representation of Char |
|---|
| 174 | jpm@cs.uu.nl**20090119112409] |
|---|
| 175 | [Fix the definitions of trueName and falseName |
|---|
| 176 | Ian Lynagh <igloo@earth.li>**20081112135645] |
|---|
| 177 | [Make NameFlavour have a full Data instance so annotations can deserialize it |
|---|
| 178 | Max Bolingbroke <batterseapower@hotmail.com>**20081016122501] |
|---|
| 179 | [Fix Trac #2700: pretty-printing of types |
|---|
| 180 | simonpj@microsoft.com**20081025164428] |
|---|
| 181 | [eliminate dependency on syb |
|---|
| 182 | Ross Paterson <ross@soi.city.ac.uk>**20081005092520] |
|---|
| 183 | [Bump version number to 2.3.0.0 |
|---|
| 184 | Ian Lynagh <igloo@earth.li>**20080920160243] |
|---|
| 185 | [TAG 6.10 branch has been forked |
|---|
| 186 | Ian Lynagh <igloo@earth.li>**20080919123439] |
|---|
| 187 | [Add a dep on syb |
|---|
| 188 | Ian Lynagh <igloo@earth.li>**20080825214350] |
|---|
| 189 | [Follow tuple datatype movements |
|---|
| 190 | Ian Lynagh <igloo@earth.li>**20080805102948] |
|---|
| 191 | [Follow flag name change |
|---|
| 192 | Ian Lynagh <igloo@earth.li>**20080719215337] |
|---|
| 193 | [Make the package -Wall clean |
|---|
| 194 | Ian Lynagh <igloo@earth.li>**20080619001100] |
|---|
| 195 | [Make the StringConstr [] case of dataToQa fail rather than be an unhandled case |
|---|
| 196 | Ian Lynagh <igloo@earth.li>**20080619001004] |
|---|
| 197 | [Make rename of a SigP fail properly, rather than just being an unhandled case |
|---|
| 198 | Ian Lynagh <igloo@earth.li>**20080619000806] |
|---|
| 199 | [We only need -fno-warn-deprecations, not -w |
|---|
| 200 | Ian Lynagh <igloo@earth.li>**20080616233139] |
|---|
| 201 | [List exact extensions used rather than using -fglasgow-exts |
|---|
| 202 | Ian Lynagh <igloo@earth.li>**20080616233016] |
|---|
| 203 | [TAG 2008-05-28 |
|---|
| 204 | Ian Lynagh <igloo@earth.li>**20080528004440] |
|---|
| 205 | Patch bundle hash: |
|---|
| 206 | 0d8d88aa898e5c26286749d0b6c60cde1a88c552 |
|---|