> Adding 'unsafePerformIO' will work, but a better idea might be to
> understand why your solver has IO in its type signature. Is this because
> of FFI calls? You can remove IO in FFI calls if they are free from side
> effects as well.
My solver has IO in the type signature, because I said so. :o)
On Thu, Jun 25, 2009 at 3:49 PM, John Meacham wrote:
> However, if the algorithm takes a signifigant amount
> of time or resources, you may want to keep it in IO just so users can
> have control over exactly when and how often it is run.
If you had a pure function written in Haskell that used a lo
On Thu, Jun 25, 2009 at 03:38:41PM +0200, Matthias Görgens wrote:
> I have a program that optimizes train schedules. It employs an
> external solver for Integer Linear Programs. The solve function has
> the following type:
>
> > solve :: Constraints -> IO (Maybe Solution)
>
> And this works. H
Matthias Görgens wrote:
> I have a program that optimizes train schedules. It employs an
> external solver for Integer Linear Programs. The solve function has
> the following type:
>
>> solve :: Constraints -> IO (Maybe Solution)
>
> And this works. However, my external solver also behaves lik
I have a program that optimizes train schedules. It employs an
external solver for Integer Linear Programs. The solve function has
the following type:
> solve :: Constraints -> IO (Maybe Solution)
And this works. However, my external solver also behaves like a pure
function from input to outpu