Skip to content

Implement getShakeExtra#503

Merged
ndmitchell merged 1 commit into
ndmitchell:masterfrom
bgamari:master
Dec 20, 2016
Merged

Implement getShakeExtra#503
ndmitchell merged 1 commit into
ndmitchell:masterfrom
bgamari:master

Conversation

@bgamari
Copy link
Copy Markdown
Contributor

@bgamari bgamari commented Dec 15, 2016

This is a convenient utility to extract a particular key from shakeExtra.
Unfortunately we can't make this interface typesafe since shakeExtra is a bit
too general: there is no known relationship between the key TypeRep and the
value at that key.

This is a convenient utility to extract a particular key from shakeExtra.
Unfortunately we can't make this interface typesafe since shakeExtra is a bit
too general: there is no known relationship between the key TypeRep and the
value at that key.
@ndmitchell
Copy link
Copy Markdown
Owner

I think the right thing to do is to add a corresponding addShakeExtra which does the insert correctly, and also at startup check all items in shakeExtra obey the types/values invariant. I'll add those changes on top of this.

@ndmitchell ndmitchell merged commit f2406e7 into ndmitchell:master Dec 20, 2016
ndmitchell added a commit that referenced this pull request Dec 23, 2016
ndmitchell added a commit that referenced this pull request Dec 28, 2016
ndmitchell added a commit that referenced this pull request Dec 28, 2016
ndmitchell added a commit that referenced this pull request Dec 28, 2016
ndmitchell added a commit that referenced this pull request Dec 28, 2016
ndmitchell added a commit that referenced this pull request Dec 28, 2016
@ndmitchell
Copy link
Copy Markdown
Owner

I added addShakeExtra and made it an extra for shakeExtra to not obey the obvious invariant - meaning the failure in getShakeExtra is now impossible to hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants