<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">```hs<div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(116, 229, 202); background-color: rgb(22, 27, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #5a23f9" class="">λ> </span><span style="font-variant-ligatures: no-common-ligatures" class="">let !v = VS.fromList [3,2,5] in isSameVector (SomeVector v) (SomeVector v)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(116, 229, 202); background-color: rgb(22, 27, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">False</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(90, 35, 249); background-color: rgb(22, 27, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">λ> </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(116, 229, 202); background-color: rgb(22, 27, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #5a23f9" class="">λ> </span><span style="font-variant-ligatures: no-common-ligatures" class="">let !v = SomeVector (VS.fromList [3,2,5]) in isSameVector v v</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(116, 229, 202); background-color: rgb(22, 27, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">True</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(90, 35, 249); background-color: rgb(22, 27, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">λ> </span></div></div><div class="">```</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 2021-04-06, at 20:34, Henning Thielemann <<a href="mailto:lemming@henning-thielemann.de" class="">lemming@henning-thielemann.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">On Tue, 6 Apr 2021, YueCompl wrote:<br class=""><br class=""><blockquote type="cite" class="">Thanks, it's a good idea. Unfortunately the result remains, making me even more curious.<br class="">```hs<br class="">λ> :set -XBangPatterns<br class="">λ> <br class="">λ> :set -package vector<br class="">package flags have changed, resetting and loading new packages...<br class="">λ> <br class="">λ> import Prelude<br class="">λ> <br class="">λ> import Control.Monad.ST<br class="">λ> import qualified Data.Vector.Storable as VS<br class="">λ> <br class="">λ> :{<br class="">λ| <br class="">λ| newtype SomeVector = SomeVector (VS.Vector Int)<br class="">λ| <br class="">λ| isSameVector :: SomeVector -> SomeVector -> Bool<br class="">λ| isSameVector (SomeVector !x) (SomeVector !y) = <br class="">λ| x'offset == y'offset && x'fp == y'fp<br class="">λ| where<br class="">λ| (x'fp, x'offset, _x'len) = VS.unsafeToForeignPtr x<br class="">λ| (y'fp, y'offset, _y'len) = VS.unsafeToForeignPtr y<br class="">λ| :}<br class="">λ> <br class="">λ> let !v = VS.fromList [5..200000] in isSameVector (SomeVector v) (SomeVector v)<br class="">False<br class=""></blockquote><br class="">What happens for [3,2,5]?<br class=""><br class=""><br class=""><blockquote type="cite" class="">λ> <br class="">λ> let !v = SomeVector (VS.fromList [3,2,5]) in isSameVector v v<br class="">True<br class="">λ> <br class="">```</blockquote></div></div></blockquote></div><br class=""></div></body></html>