Real.round probadorHaskellOCL
Contexto Real
self.double.round()=self.entero
No genera codigo
2.3.round()=2
genera
invariant0 = context _Real1 [invariantReal1]
invariantReal1 self = ((oclDouble 2.3 |.| roundOCL)) |==| (oclInt 2)
error en el tipo
• Couldn't match type ‘Val Double’
with ‘ReaderT m Data.Functor.Identity.Identity (Val Double)’
Expected type: Val Double -> OCL m (Val Int)
Actual type: OCL m (Val Double) -> OCL m (Val Int)
• In the second argument of ‘(|.|)’, namely ‘roundOCL’
In the first argument of ‘(|==|)’, namely
‘((oclDouble 2.3 |.| roundOCL))’
In the expression: ((oclDouble 2.3 |.| roundOCL)) |==| (oclInt 2)
• Relevant bindings include
invariantReal1 :: t -> OCL m (Val Bool) (bound at ACCELEO.hs:196:1)