[Haskell-cafe] error to Fail Conversion
Anwar Bari
noor2004 at yahoo.com
Sun Apr 3 16:31:10 CEST 2011
HI Cafe
I have problem with this function
value :: Theorm-> [(String,Int)] -> Tem -> Int
value _ env (Var s) = maybe (error "Unknown variable.") id (lookup s env)
value mdl env (OP s _ _ l) = maybe (error "Function not defined.") id (lookup
(map (value mdl env) l) (S.toList $ maybe (error
"Uknown function.") id (fmap snd (multiLookup s (operations mdl)))))
This function is working fine, but I want to change error function to fail
function to be able use it in my GUI application.
I can't change the output of value function to IO Int,any idea will help.
Thanks
Nour.
More information about the Haskell-Cafe
mailing list