On Tuesday 11 October 2011, 00:57:39, Paul Monday wrote: > There seems to be plenty of documentation around on implementing a new > primop, much of it needs some tweaking as files have moved and such. I > can't seem to find any documentation about how to implement primtypes > though. > > For example, I want to experiment with a new primtype "DV#", my > assumption that the type was first declared in the primops.txt.pp seems > incorrect. So I'm trying to backtrack a bit and see where primtypes > first appear, I'm hoping someone can at least give me a pointer :-) > > For example: > ./compiler/prelude/primops.txt.pp > > Add the following: > primtype DoubleVec# a
Has a type parameter > > Compiles fine > > Add a primop on the type: > primop ExtractDoubleVecOp "extractDoubleVec#" GenPrimOp > DoubleVec# -> Int# -> Double# Used without type parameter Might be as simple as that. > genprimopcode: ppType: can't handle: TyApp "DoubleVec#" [] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe