| | 58 | = Discussion = |
| | 59 | |
| | 60 | Initial discussion of the proposal can be [http://thread.gmane.org/gmane.comp.lang.haskell.libraries/17649/ found here]. |
| | 61 | |
| | 62 | = Resolved issues = |
| | 63 | |
| | 64 | I have made some changes to the package as a result of discussion, |
| | 65 | explained below. The changes can be seen in the |
| | 66 | [http://code.haskell.org/~byorgey/code/split darcs repository]; a new |
| | 67 | version of the package has not yet been released. |
| | 68 | |
| | 69 | == Use of GADTs/ExistentialQuantification == |
| | 70 | |
| | 71 | Henning Thielemann [http://article.gmane.org/gmane.comp.lang.haskell.libraries/17650 asked] whether the GADTs extension is really necessary. Twan van Laarhoven [http://article.gmane.org/gmane.comp.lang.haskell.libraries/17659 suggested] a way around it. I have adopted a variant of Twan's proposal, and the package is now fully Haskell 2010 compliant. |
| | 72 | |
| | 73 | == Synonyms == |
| | 74 | |
| | 75 | [http://article.gmane.org/gmane.comp.lang.haskell.libraries/17653 Roman Cheplyaka] and others expressed distaste at the presence of synonyms for several functions in the library, arguing that it unnecessarily complicates the API and makes it harder to read others' code. |
| | 76 | |
| | 77 | Following a [http://article.gmane.org/gmane.comp.lang.haskell.libraries/17669 suggestion from Simon Hengel], I have adopted the solution of |
| | 78 | |
| | 79 | * marking the synonyms as deprecated; |
| | 80 | * passing the "prune" option to haddock so they are not documented as part of the API. |
| | 81 | |
| | 82 | This effectively does away with any confusion the synonyms may cause, |
| | 83 | WITHOUT breaking any existing code, since the synonyms are still |
| | 84 | exported. Note, however, that I do plan to bump the major version number, as [http://www.haskell.org/haskellwiki/Package_versioning_policy#Deprecation recommended by the package versioning policy]. |
| | 85 | |
| | 91 | |
| | 92 | * Henning Thielemann [http://article.gmane.org/gmane.comp.lang.haskell.libraries/17650 suggested]: |
| | 93 | |
| | 94 | You could provide two private modules with the same name in |
| | 95 | different directories, one that re-exports 'build' from GHC.Exts and |
| | 96 | one with a custom definition of 'build' for non-GHC compilers. Then |
| | 97 | set 'Hs-Source-Dirs' in Cabal according to the impl(ghc). No CPP |
| | 98 | needed, only Cabal. One could even think of a separate package for |
| | 99 | this purpose. |
| | 100 | |
| | 101 | I am currently investigating whether this can be made to work (and how |
| | 102 | it affects building the test suite). |