Re: Type family equation violates injectivity?

2019-01-04 Thread Carter Schonwald
t;>>> shouldn't be there, OR there need to be two "s" params in inline-r >>>>>>>> instead >>>>>>>> of the one >>>>>>>> >>>>>>>> heres the full code i linked to in question >&

Re: Type family equation violates injectivity?

2019-01-04 Thread Alexander V Vershilov
ams in inline-r >>>>>>> instead >>>>>>> of the one >>>>>>> >>>>>>> heres the full code i linked to in question >>>>>>> >>>>>>> >>>>>>> -- | Mutable R

Re: Type family equation violates injectivity?

2019-01-04 Thread Carter Schonwald
the same header as >>>>>> 'SEXP' >>>>>> >>>>>> -- nodes. The second type parameter is phantom, reflecting at the >>>>>> type level the >>>>>> -- tag of the vector when viewed as a 'SEXP'. The ta

Re: Type family equation violates injectivity?

2019-01-04 Thread Alexander V Vershilov
;>>>> data MVector s ty a = MVector >>>>> { mvectorBase :: {-# UNPACK #-} !(SEXP s ty) >>>>> , mvectorOffset :: {-# UNPACK #-} !Int32 >>>>> , mvectorLength :: {-# UNPACK #-} !Int32 >>>>> } >>>>> -- | Internal wra

Re: Type family equation violates injectivity?

2019-01-04 Thread Carter Schonwald
pe for reflection. First type parameter is the >>>> reified >>>> -- type to reflect. >>>> newtype W t ty s a = W { unW :: MVector s ty a } >>>> instance (Reifies t (AcquireIO s), VECTOR s ty a) => G.MVector (W t ty) >>>> a wher

Re: Type family equation violates injectivity?

2019-01-04 Thread Carter Schonwald
ector >>> { vectorBase :: {-# UNPACK #-} !(ForeignSEXP ty) , vectorOffset :: >>> {-# UNPACK #-} !Int32 , vectorLength :: {-# UNPACK #-} !Int32 >>> } >>> >>> >>> type instance G.Mutable (W t ty s) = Mutable.W t ty >>> Anyways, t

Re: Type family equation violates injectivity?

2019-01-04 Thread Boespflug, Mathieu
:: {-# UNPACK #-} !Int32 >> } >> >> >> type instance G.Mutable (W t ty s) = Mutable.W t ty >> Anyways, the fix here is to remove the s param from the Pure version of W >> and "Sexp Vector" >> >> >> >> On Sat, Dec 29, 2018 at 6:16 P

Re: Type family equation violates injectivity?

2018-12-30 Thread Carter Schonwald
gt;>> { vectorBase :: {-# UNPACK #-} !(ForeignSEXP ty) , vectorOffset :: >>> {-# UNPACK #-} !Int32 , vectorLength :: {-# UNPACK #-} !Int32 >>> } >>> >>> >>> type instance G.Mutable (W t ty s) = Mutable.W t ty >>> Anyways, the fix here i

Re: Type family equation violates injectivity?

2018-12-29 Thread Carter Schonwald
ector >> { vectorBase :: {-# UNPACK #-} !(ForeignSEXP ty) , vectorOffset :: >> {-# UNPACK #-} !Int32 , vectorLength :: {-# UNPACK #-} !Int32 >> } >> >> >> type instance G.Mutable (W t ty s) = Mutable.W t ty >> Anyways, the fix here is to remove the

Re: Type family equation violates injectivity?

2018-12-29 Thread Carter Schonwald
x here is to remove the s param from the Pure version of W > and "Sexp Vector" > > > > On Sat, Dec 29, 2018 at 6:16 PM Carter Schonwald < > carter.schonw...@gmail.com> wrote: > >> were you using the same version of vector in both setups? >> >>

Re: Type family equation violates injectivity?

2018-12-29 Thread Carter Schonwald
gt; were you using the same version of vector in both setups? > > in the most recent vector release we made mutable type family injective > in the vector package for ghc's that support it ... > > On Sat, Dec 29, 2018 at 1:50 PM Dominick Samperi > wrote: > >> When I use

Re: Type family equation violates injectivity?

2018-12-29 Thread Carter Schonwald
tall the inline-r package > I get the error "Type family equation violates injectivity annotation," and > a type variable on the LHS cannot be inferred from the RHS, due to > the lack of injectivity (I suppose). > > On the other hand, v8.0.2 of GHC (shipped with Haskell

Type family equation violates injectivity?

2018-12-29 Thread Dominick Samperi
When I use v8.6.3 of GHC under Ubuntu to install the inline-r package I get the error "Type family equation violates injectivity annotation," and a type variable on the LHS cannot be inferred from the RHS, due to the lack of injectivity (I suppose). On the other hand, v8.0.2 of GHC (sh