
4 Nov
2010
4 Nov
'10
6:26 p.m.
On Thu, 4 Nov 2010, Ryan Ingram wrote:
When you use arrows for your DSL, how do you avoid getting trapped by "arr"? It seems like it's hard to avoid people working arbitrary functions into your computation using it.
I use this for instance in synthesizer-llvm. Actually people can lift anything into the arrow, but in the end there is a run function that expects an arrow of type Arrow (Value a) (Value b) where (Value a) denotes a virtual LLVM register that holds a value with a type equivalent to the Haskell type 'a'. There are functions like (\a -> (a,a)) that can be lifted to the arrow and that make sense. But e.g. there is no (uncury (+)) for Value.