Puzzling (to me) type error message

Colin Adams colinpauladams at googlemail.com
Tue Mar 24 04:18:32 EDT 2009


Oh, I see.
I assumed that is was being re-exported by one of the other imports
and was being pulled in like that.
I added an explicit import for the type and it now compiles the signature.

Thanks.

2009/3/24 Max Bolingbroke <batterseapower at hotmail.com>:
> 2009/3/24 Colin Adams <colinpauladams at googlemail.com>:
>> UI.hs:625:45: Not in scope: type constructor or class `Move.Move'
>>
>> If I then comment-out the type signature for run_ai, it compiles fine
>> with the following warning message:
>>
>> UI.hs:626:0:
>>    Warning: Definition but no type signature for `run_ai'
>>             Inferred type: run_ai :: Chan Non_interactive_state
>>                                      -> Chan Move.Move
>>                                      -> IO ()
>
> Have you actually imported the Move.Move type? GHC /can/ suggest a
> type signature that includes type constructors that you haven't
> imported, but which show up in e.g. the types of imported functions.
>
> Cheers,
> Max
>


More information about the Glasgow-haskell-users mailing list