Re: [Haskell-cafe] Haskell and symbolic references

2009-05-31 Thread Matt Morrow
(i always forget to reply-to-all) If you'd like to reference C functions with Strings, one possible way is to use System.Posix.DynamicLinker and the wrapper over libffi that's been uploaded to hackage recently: [...@monire asdf]$ ghci GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help

Re: [Haskell-cafe] Haskell and symbolic references

2009-05-29 Thread Khudyakov Alexey
On Friday 29 of May 2009 19:34:44 Patrick LeBoutillier wrote: > Hi all, > > Is it possible with Haskell to call a function whose name is contained > in a String? > Something like: > > five = call_func "add" [2, 3] > > If not, perhaps this is acheivable using FFI? > Or maybe you are asking for templ

Re: [Haskell-cafe] Haskell and symbolic references

2009-05-29 Thread Jake McArthur
Patrick LeBoutillier wrote: Hi all, Is it possible with Haskell to call a function whose name is contained in a String? Something like: five = call_func "add" [2, 3] You could use Data.Map: call_func = (funcMap !) where funcMap = fromList [ ("add", add)

RE: [Haskell-cafe] Haskell and symbolic references

2009-05-29 Thread Bayley, Alistair
> From: haskell-cafe-boun...@haskell.org > [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of > Is it possible with Haskell to call a function whose name is contained > in a String? > Something like: > > five = call_func "add" [2, 3] > > If not, perhaps this is acheivable using FFI? Dynam