Commit 31fc3321 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan Committed by Marge Bot

Add regression test for #12926

Closes #12926
parent 04f51297
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module A where
import GHC.Base
import qualified Data.Vector.Unboxed.Base
import qualified Data.Vector.Generic.Base
import Data.Vector.Generic.Mutable
import qualified Data.Vector.Generic.Mutable.Base
import Data.Vector.Generic (fromList)
data A = A Int Int Int
instance Data.Vector.Unboxed.Base.Unbox A
newtype instance Data.Vector.Unboxed.Base.MVector s_a4iX A
= MV_A (Data.Vector.Unboxed.Base.MVector s_a4iX (Int, Int, Int))
instance MVector Data.Vector.Unboxed.Base.MVector A where
basicLength (MV_A v) =
basicLength v
basicUnsafeSlice idx len (MV_A v) =
MV_A (basicUnsafeSlice idx len v)
basicUnsafeNew len =
MV_A `liftM` (basicUnsafeNew len)
basicUnsafeWrite (MV_A v) idx val_a4iW =
basicUnsafeWrite v idx ((\ (A a_a4iT b_a4iU c_a4iV) -> (a_a4iT, b_a4iU, c_a4iV)) val_a4iW)
newtype instance Data.Vector.Unboxed.Base.Vector A =
V_A (Data.Vector.Unboxed.Base.Vector (Int, Int, Int))
instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector A where
mkA :: Data.Vector.Unboxed.Base.Vector A
mkA = fromList []
......@@ -696,3 +696,4 @@ test('T17343', exit_code(1), compile_and_run, [''])
test('T17566', [extra_files(['T17566a.hs'])], makefile_test, [])
test('T12760', unless(compiler_debugged(), skip), compile, ['-O'])
test('T13142', normal, compile, ['-O2'])
test('T12926', reqlib('vector'), compile, ['-O2'])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment