-
Notifications
You must be signed in to change notification settings - Fork 141
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
Conversation
There was a problem hiding this 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. | |||
-- |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
.
In the interest of moving this along, I've pushed a commit which adds a test for |
@cartazio, does this need any more changes before being merged? |
Looks good to me. |
* make Data.Vector.Generic.Base.Mutable injective * Add test, use __GLASGOW_HASKELL_
See #34