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

Fix https://github.com/haskell/vector/issues/223 #224

Merged
merged 1 commit into from
Oct 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Data/Vector/Mutable.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{-# LANGUAGE CPP, DeriveDataTypeable, MultiParamTypeClasses, FlexibleInstances, BangPatterns, TypeFamilies #-}

#if __GLASGOW_HASKELL__ >= 708
{-# LANGUAGE RoleAnnotations #-}
#endif

-- |
-- Module : Data.Vector.Mutable
-- Copyright : (c) Roman Leshchinskiy 2008-2010
Expand Down Expand Up @@ -62,6 +66,10 @@ import Data.Typeable ( Typeable )

#include "vector.h"

#if __GLASGOW_HASKELL__ >= 708
type role MVector nominal representational
#endif

-- | Mutable boxed vectors keyed on the monad they live in ('IO' or @'ST' s@).
data MVector s a = MVector {-# UNPACK #-} !Int
{-# UNPACK #-} !Int
Expand Down
8 changes: 8 additions & 0 deletions Data/Vector/Primitive.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{-# LANGUAGE CPP, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses, TypeFamilies, ScopedTypeVariables, Rank2Types #-}

#if __GLASGOW_HASKELL__ >= 708
{-# LANGUAGE RoleAnnotations #-}
#endif

-- |
-- Module : Data.Vector.Primitive
-- Copyright : (c) Roman Leshchinskiy 2008-2010
Expand Down Expand Up @@ -177,6 +181,10 @@ import Data.Traversable ( Traversable )
import qualified GHC.Exts as Exts
#endif

#if __GLASGOW_HASKELL__ >= 708
type role Vector representational
#endif

-- | Unboxed vectors of primitive types
data Vector a = Vector {-# UNPACK #-} !Int
{-# UNPACK #-} !Int
Expand Down
8 changes: 8 additions & 0 deletions Data/Vector/Storable.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{-# LANGUAGE CPP, DeriveDataTypeable, MultiParamTypeClasses, FlexibleInstances, TypeFamilies, Rank2Types, ScopedTypeVariables #-}

#if __GLASGOW_HASKELL__ >= 708
{-# LANGUAGE RoleAnnotations #-}
#endif

-- |
-- Module : Data.Vector.Storable
-- Copyright : (c) Roman Leshchinskiy 2009-2010
Expand Down Expand Up @@ -186,6 +190,10 @@ import qualified GHC.Exts as Exts
#define NOT_VECTOR_MODULE
#include "vector.h"

#if __GLASGOW_HASKELL__ >= 708
type role Vector representational
#endif

-- | 'Storable'-based vectors
data Vector a = Vector {-# UNPACK #-} !Int
{-# UNPACK #-} !(ForeignPtr a)
Expand Down
8 changes: 8 additions & 0 deletions Data/Vector/Storable/Mutable.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{-# LANGUAGE CPP, DeriveDataTypeable, FlexibleInstances, MagicHash, MultiParamTypeClasses, ScopedTypeVariables #-}

#if __GLASGOW_HASKELL__ >= 708
{-# LANGUAGE RoleAnnotations #-}
#endif

-- |
-- Module : Data.Vector.Storable.Mutable
-- Copyright : (c) Roman Leshchinskiy 2009-2010
Expand Down Expand Up @@ -93,6 +97,10 @@ import Data.Typeable ( Typeable )
#define NOT_VECTOR_MODULE
#include "vector.h"

#if __GLASGOW_HASKELL__ >= 708
type role MVector nominal representational
#endif

-- | Mutable 'Storable'-based vectors
data MVector s a = MVector {-# UNPACK #-} !Int
{-# UNPACK #-} !(ForeignPtr a)
Expand Down