signature files - F# denies existence of a constructor (probably type-constraint related) -


on following code, f sharp says: module xyz requires value new : (iblah<'a> * 'b) -> test<'a, 'b>')

i have tried supplying exact constructor explicit new did not seem help, though intellisense though type same. expect have somehow got constraints wrong. please tell me change code compiles (without removing constraints)? many thanks.

first fsi file:

module xyz  type iblah<'a> =     abstract : 'a -> 'a  type ihuha =     abstract : unit -> unit  type test<'a, 'b when 'a :> ihuha , 'b : comparison> =     new : (iblah<'a> * 'b) -> test<'a, 'b>     member huha : unit -> unit 

the fs file is:

module xyz  type iblah<'a> =     abstract : 'a -> 'a  type ihuha =     abstract : unit -> unit  type test<'a, 'b when 'a :> ihuha , 'b : comparison> (x:iblah<'a>, y:'b) =      member x.huha () = printf "%o" x 

the problem signature file describing constructor takes single value of type tuple

(iblah<'a> * 'b) 

the actual constructor though takes 2 values of type iblah<'a> , 'b. speculating .fs implementation 1 want. if remove parens .fsi file

new : iblah<'a> * 'b -> test<'a, 'b> 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -