<div dir="ltr">Hey all, <div style>a number of primops GHC has gained in the past year, prefetch and family, as well as further primops that people (such as myself) hope to add require certain arguments be known constant values at compile time for code gen to work correctly. </div>

<div style><br></div><div style>I detail the problem a little bit further on this ghc trac ticket : <a href="http://ghc.haskell.org/trac/ghc/ticket/8107">http://ghc.haskell.org/trac/ghc/ticket/8107</a></div><div style><br>

</div><div style>but the punchline is, a number of valuable SIMD, memory, and concurrent memory model primops that are worth adding to GHC and making first class operations, really require certain arguments to be compile time constant to work correctly. </div>

<div style><br></div><div style>Accordingly, from the perspective of making those operations *truly* first class, augmenting the haskell type system to have a way of expressing &quot;this argument must be a known value at compile time&quot; that doesn&#39;t require template haskell shenanigans might be really valuable. </div>

<div style><br></div><div style><br></div><div style>thoughts all?</div><div style><br></div><div style>note that for some of these arguments that need to be compile time constants, llvm et al will generate different machine code depending on the argument!  (llvm doesn&#39;t even have the ability to express this invariant in its current API / data model, it just checks it when it tries to compile the code)</div>

<div style><br></div><div style>cheers</div><div style><br></div><div style>-Carter</div></div>