Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make Data.Vector.Generic.Base.Mutable injective #160

Merged
merged 2 commits into from Aug 20, 2017

Conversation

strake
Copy link
Contributor

@strake strake commented Mar 26, 2017

See #34

@cartazio
Copy link
Contributor

@dolio @hvr do injective type families give the amount of injectivity that folks anticipated/hoped for?

Copy link
Contributor

@cartazio cartazio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has no tests

could you add one that ideally exercises the required injectivity?

@@ -24,9 +28,13 @@ import qualified Data.Vector.Generic.Mutable.Base as M
import Control.Monad.Primitive

-- | @Mutable v s a@ is the mutable version of the pure vector type @v a@ with
-- the state token @s@
-- the state token @s@. It is injective on GHC 8 and newer.
--
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to have 1-2 tests that validate that injectivity work on small examples that run when new enough ghc is available :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See tests/Tests/Vector/UnitTests.hs.

@RyanGlScott
Copy link
Member

In the interest of moving this along, I've pushed a commit which adds a test for Mutable's injectivity.

@RyanGlScott
Copy link
Member

@cartazio, does this need any more changes before being merged?

@cartazio
Copy link
Contributor

Looks good to me.

@RyanGlScott RyanGlScott merged commit 3c51c33 into haskell:master Aug 20, 2017
cartazio pushed a commit that referenced this pull request Dec 7, 2018
* make Data.Vector.Generic.Base.Mutable injective
* Add test, use __GLASGOW_HASKELL_
@Shimuuar Shimuuar mentioned this pull request Jan 31, 2020
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.

None yet

3 participants