Skip to content

Add MINIMAL pragma to Vector & MVector type classes #289

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

Merged
merged 4 commits into from
Jun 8, 2020

Conversation

Shimuuar
Copy link
Contributor

@Shimuuar Shimuuar commented Feb 1, 2020

At the moment only checked that MINIMAL is indeed minimal and no method is ⊥ by visual inspection

Fixes #11

@Shimuuar Shimuuar force-pushed the kh/minimal branch 2 times, most recently from dc5f339 to 9b65b8e Compare February 2, 2020 14:52
@Shimuuar Shimuuar marked this pull request as ready for review February 2, 2020 14:54
@Shimuuar
Copy link
Contributor Author

Shimuuar commented Feb 2, 2020

Yes, list is indeed minimal. I also thrown in fix for #213

Copy link
Contributor

@lehins lehins left a comment

Choose a reason for hiding this comment

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

Few suggestion on haddock, otherwise looks great

Comment on lines 284 to 289
-- | Create a mutable vector of the given length. The vector content
-- should be presumed uninitialized. However exact semantics depends
-- on vector implementation. For example unboxed and storable
-- vectors will create vector filled with whatever underlying memory
-- buffer happens to contain, while boxed vector initializes every
-- element to @error "..."@.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
-- | Create a mutable vector of the given length. The vector content
-- should be presumed uninitialized. However exact semantics depends
-- on vector implementation. For example unboxed and storable
-- vectors will create vector filled with whatever underlying memory
-- buffer happens to contain, while boxed vector initializes every
-- element to @error "..."@.
-- | Create a mutable vector of the given length. Boxed vector is
-- initialized with every element set to @error "..."@.
--
-- @since 0.5

@Bodigrim
Copy link
Contributor

Bodigrim commented Jun 7, 2020

I'd probably say that elements of boxed vectors are initialized with bottoms, but do not overspecify whether it is error or undefined or another diverging computation.

@Shimuuar
Copy link
Contributor Author

Shimuuar commented Jun 7, 2020

@lehins Thanks for the suggestion. They definitely improved haddocks. And thanks for finding out those @since pragmas

@Bodigrim Yeah, good idea. I also specified that it's exception throwing bottom.

@lehins lehins merged commit f606daa into haskell:master Jun 8, 2020
@Shimuuar Shimuuar deleted the kh/minimal branch June 19, 2020 17:47
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.

Add Minimal annotations to Vector typeclasses
3 participants