This repository was archived by the owner on Oct 4, 2020. It is now read-only.
Export constructor via .Internal module? #113
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my app I wrote some custom traversal functions for a segment of a Map: https://github.com/mtolly/onyxite-customs/blob/9d1b210cdcea75ed1b5220cf9e5b39add21f5901/player/src/OnyxMap.purs#L507-L545
These require access to the
Leaf
/Two
/Three
constructors, so for now I've been copying and modifying the module inside my app. But if you are open to it, it would be nice to simply have access via an (explicitly unstable)Internal
module. Rather than try to split the definitions I simply moved the whole existingData.Map
toData.Map.Internal
, exportedMap(..)
, and then haveData.Map
reexport all ofInternal
except the constructors.Apologies for the ugly diff + disruption to other PRs. I totally understand if you'd rather not export them, just figured I'd check. Or, let me know if you'd rather just export them from
Data.Map
.