solveTraj :: Factory -> Geometry -> Detector -> Sample -> Pipe Engine Geometry IO () solveTraj f g d s = do e <- await let name = engineName e withSample s $ \sample -> withDetector d $ \detector -> withGeometry f g $ \geometry -> withEngineList f $ \engines -> withCString name $ \cname -> do c_hkl_engine_list_init engines geometry detector sample engine <- c_hkl_engine_list_engine_get_by_name engines cname nullPtr n <- c_hkl_engine_pseudo_axis_names_get engine >>= darrayStringLen yield $ solve' engine n e >>= getSolution0
src/Hkl/C.hsc:83:3: Couldn't match type `IO' with `Proxy () Engine () Geometry IO' Expected type: Proxy () Engine () Geometry IO () Actual type: IO () In a stmt of a 'do' block: withSample s $ \ sample -> withDetector d $ \ detector -> withGeometry f g $ \ geometry -> ... In the expression: do { e <- await; let name = engineName e; withSample s $ \ sample -> withDetector d $ \ detector -> ... } In an equation for `solveTraj': solveTraj f g d s = do { e <- await; let name = ...; withSample s $ \ sample -> withDetector d $ ... }
src/Hkl/C.hsc:91:19: Couldn't match type `Proxy x'0 x0 () (IO Geometry) m0' with `IO' Expected type: IO () Actual type: Proxy x'0 x0 () (IO Geometry) m0 () In a stmt of a 'do' block: yield $ solve' engine n e >>= getSolution0 In the expression: do { c_hkl_engine_list_init engines geometry detector sample; engine <- c_hkl_engine_list_engine_get_by_name engines cname nullPtr; n <- c_hkl_engine_pseudo_axis_names_get engine >>= darrayStringLen; yield $ solve' engine n e >>= getSolution0 } In the second argument of `($)', namely `\ cname -> do { c_hkl_engine_list_init engines geometry detector sample; engine <- c_hkl_engine_list_engine_get_by_name engines cname nullPtr; .... }'
I do not understand why the yield does not produce the right type as output.
I think I missed something big :), but...
Thanks for your help
Fred _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners