Add export lists to some modules.
ClosedPublic

Authored by dfeuer on Dec 2 2014, 11:45 AM.

Details

Summary

This makes it easier to see what is exported, and allows us to
add non-exported top-level names.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Branch
exports
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 2444
Build 2455: GHC Patch Validation (amd64/Linux)
dfeuer updated this revision to Diff 1827.Dec 2 2014, 11:45 AM
dfeuer retitled this revision from to Add export lists to some modules..
dfeuer updated this object.
dfeuer edited the test plan for this revision. (Show Details)
dfeuer added reviewers: hvr, austin.
dfeuer updated the Trac tickets for this revision.
dfeuer added a project: GHC.
dfeuer updated this revision to Diff 1833.Dec 2 2014, 9:56 PM

Fix silliness from a bad build.

dfeuer updated this revision to Diff 1835.Dec 2 2014, 10:39 PM

Little update.

dfeuer updated this revision to Diff 1836.Dec 2 2014, 11:12 PM

No more optimism.

dfeuer updated this revision to Diff 1837.Dec 2 2014, 11:25 PM

yadda yadda

dfeuer updated this revision to Diff 1838.Dec 2 2014, 11:36 PM

10^17th time's the charm.

dfeuer updated this revision to Diff 1839.Dec 2 2014, 11:46 PM

That's what he said.

dfeuer updated this revision to Diff 1840.Dec 2 2014, 11:56 PM

String.

hvr edited edge metadata.Dec 3 2014, 2:53 AM

btw, what indentation style for the export-list did you use? the indentation-amount seems to vary a bit from module to module

austin requested changes to this revision.Dec 5 2014, 2:25 PM
austin edited edge metadata.

@dfeuer, does this build? Maybe try kicking Harbormaster if it does but ran out of memory.

Otherwise this looks fine I suppose.

This revision now requires changes to proceed.Dec 5 2014, 2:25 PM
dfeuer updated this revision to Diff 2011.Dec 23 2014, 11:01 AM
dfeuer edited edge metadata.

Catch more exports; update for changes.

dfeuer updated this revision to Diff 2012.Dec 23 2014, 12:04 PM
dfeuer edited edge metadata.

Fix ambiguous export.

This builds for me, and I don't anticipate validation problems, but it would be nice to get Windows and Mac builds before committing.

did a quick build on OS X, HEAD seems to bulid fine with this patch

ezyang accepted this revision.Dec 27 2014, 6:06 PM
ezyang added a reviewer: ezyang.
ezyang added a subscriber: ezyang.

Assuming that you've checked the before and after export lists from the hi files are the same and it validates, LGTM.

In D551#16734, @ezyang wrote:

Assuming that you've checked the before and after export lists from the hi files are the same and it validates, LGTM.

I have now checked this—diff shows the interface dumps are identical. Let's commit this thing before the sand shifts under its feet.

This revision was automatically updated to reflect the committed changes.

This has broken compilation with integer-simple.

The module I see fail is GHC.Real trying to export functions (gcdInt' and gcdWord') which don't exist under the integer-simple library because of ifdefs:

#ifdef OPTIMISE_INTEGER_GCD_LCM
{-# RULES
"gcd/Int->Int->Int"             gcd = gcdInt'
"gcd/Integer->Integer->Integer" gcd = gcdInteger
"lcm/Integer->Integer->Integer" lcm = lcmInteger
 #-}

gcdInt' :: Int -> Int -> Int
gcdInt' (I# x) (I# y) = I# (gcdInt x y)

#if MIN_VERSION_integer_gmp(1,0,0)
{-# RULES
"gcd/Word->Word->Word"          gcd = gcdWord'
 #-}

gcdWord' :: Word -> Word -> Word
gcdWord' (W# x) (W# y) = W# (gcdWord x y)
#endif
#endif
ezyang added a comment.EditedDec 29 2014, 7:57 PM

Should we remove those exports?

In D551#16826, @ezyang wrote:

Let's remove those exports.

Easy:

https://phabricator.haskell.org/D600

Not sure if this will be the only module with the problem but I'll give that patch a go.

I just realised that those are functions for rewrite rules - not meant to be exported. I'll fix that up.