w what you need in your use-case. A type like ‘a’ might be a very
>> fine answer!
>>
>>
>>
>> A lot depends on precisely what you are trying to do.
>>
>>
>>
>> Simon
>>
>>
>>
>> *From:* Peter Podlovics [mailto:peter.d.podlov...@gmail
ov...@gmail.com]
> *Sent:* 05 March 2018 14:54
> *To:* Simon Peyton Jones <simo...@microsoft.com>
> *Subject:* Re: Type checking expressions
>
>
>
> My main concern with that approach is that it might not give the correct
> type. For example the hsPatType function only
il.com]
Sent: 05 March 2018 14:54
To: Simon Peyton Jones <simo...@microsoft.com>
Subject: Re: Type checking expressions
My main concern with that approach is that it might not give the correct type.
For example the hsPatType function only gives unconstrained types, so it is
incorrect for a
Peter
My goal is to determine the type of every expression, pattern etc. in the
syntax tree
After type checking is complete, the syntax tree is liberally annotated with
types.
We do not yet have a function
hsExprType :: HsExpr Id -> Type
but we do have
TcHsTyn.hsPatType