Proposal: Stop using PackedString in template-haskell; drop packedstring as a bootlib

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon Jun 1 16:55:54 EDT 2009


On Mon, 2009-06-01 at 16:52 +0100, Simon Marlow wrote:
> Proposal ticket here:
> 
>    http://hackage.haskell.org/trac/ghc/ticket/3270
> 
> Deadline for discussion: June 15 (2 weeks)
> 
> Text of the proposal:
> 
> The `packedstring` library has been superseded by the `bytestring` and 
> `text` libraries, yet we are still shipping it with GHC for only one 
> reason: it is used in the representations of three types in 
> `template-haskell`.
> 
> The proposal is that we
> 
>   * make the types `ModName`, `PkgName`, and `OccName` from 
> `Language.Haskell.TH.Syntax` into abstract newtypes (an API change)
> 
>   * change their representation from `PackedString` to `String`
> 
>   * drop the `packedstring` library from the bootlibs that GHC ships with

Seems sensible. Shouldn't break many users since the three type already
have functions to convert to and from String, which most users are
probably using. Switching to a newtype also means we don't have to break
it again if we decide to switch to Text or something in future.

Duncan



More information about the Libraries mailing list