You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The withMutablePrimArrayContents and withPrimArrayContents functions take a Ptr a -> m a, which restricts you to only returning an a. Best guess as to why this might have been done is to prevent the return of the pointer itself, but... it prevents the return of everything else too ... Why not change them to (Ptr a -> m b) -> m b?
The text was updated successfully, but these errors were encountered:
The withMutablePrimArrayContents and withPrimArrayContents functions take a Ptr a -> m a, which restricts you to only returning an a. Best guess as to why this might have been done is to prevent the return of the pointer itself, but... it prevents the return of everything else too ... Why not change them to (Ptr a -> m b) -> m b?
Darn. This was a mistake. Fortunately, changing the result type from a to b is nonbreaking even for users of TypeApplications since GHC will infer b to be the last type argument (i.e. forall (m :: Type -> Type) (a :: Type) (b :: Type).). We should release this soon after it's fixed.
The
withMutablePrimArrayContents
andwithPrimArrayContents
functions take aPtr a -> m a
, which restricts you to only returning ana
. Best guess as to why this might have been done is to prevent the return of the pointer itself, but... it prevents the return of everything else too ... Why not change them to(Ptr a -> m b) -> m b
?The text was updated successfully, but these errors were encountered: