Using an instance of a type constructor class for an 2-ary type yields type-error in Haskell
Consider the following code.
> class FStarStar f where
> fun :: f a b -> a -> b
>
> instance FStarStar (->) where
> fun f x = f x
There is no compile-error for the type class or instance involved. Running the program fun id 4
, however, yields the following type-error in Haskell.
.curry/kics2/Curry_tplp.hs:389:50: error:
Not in scope: type constructor or class ‘OP_Tuple3’
Perhaps you meant one of these:
‘Curry_Prelude.OP_Tuple3’ (imported from Curry_Prelude),
‘Curry_Prelude.OP_Tuple2’ (imported from Curry_Prelude),
‘Curry_Prelude.OP_Tuple13’ (imported from Curry_Prelude)
|
389 | -> ConstStore -> OP_uscore_Dict_hash_FStarStar OP_Tuple3
| ^^^^^^^^^
.curry/kics2/Curry_tplp.hs:395:59: error:
Not in scope: type constructor or class ‘OP_Tuple3’
Perhaps you meant one of these:
‘Curry_Prelude.OP_Tuple3’ (imported from Curry_Prelude),
‘Curry_Prelude.OP_Tuple2’ (imported from Curry_Prelude),
‘Curry_Prelude.OP_Tuple13’ (imported from Curry_Prelude)
|
395 | -> Cover -> ConstStore -> OP_uscore_Dict_hash_FStarStar OP_Tuple3
| ^^^^^^^^^
Edited by Sandra Dylus