
VecRep is used for vector operations. If you aren't using LLVM, you won't see them. VecRep's are generated by utils/genprimopcode/Main.hs. Check out compiler/stage1/build/primop-vector-tys.hs-incl in your build tree---should be plenty of generated VecRep's there :) Cheers, Geoff On 06/07/2016 05:00 AM, Ömer Sinan Ağacan wrote:
I have some code that does things depending on PrimReps of terms and so I have to handle VecRep there. To understand what VecRep exactly is and how to use it I looked at its uses, and all I can find was that we have a wired-in DataCon `vecRepDataCon` which has a type that I thought should have VecRep PrimRep, but when I test in GHCi I see that its PrimRep is PtrRep:
λ> map typePrimRep (map dataConRepType (tyConDataCons runtimeRepTyCon)) [PtrRep,PtrRep,PtrRep,PtrRep,PtrRep,PtrRep,PtrRep,PtrRep,PtrRep,PtrRep,PtrRep,PtrRep,PtrRep]
(This DataCon is not exported and only used in runtimeRepTyCon)
So I think VecRep may not be in use at the moment. Do we still need to maintain it? What's the use case? Can anyone show me a Core term that has a type whose PrimRep is VecRep?
Thanks.. _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs