Re: Type checking expressions

2018-03-05 Thread Peter Podlovics
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

Re: Type checking expressions

2018-03-05 Thread Robin Palotai
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

RE: Type checking expressions

2018-03-05 Thread Simon Peyton Jones via ghc-devs
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

RE: Type checking expressions

2018-03-05 Thread Simon Peyton Jones via ghc-devs
otated tree in that case. But they are relatively rare. Others must have wanted something like this… Simon From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Peter Podlovics Sent: 02 March 2018 12:05 To: ghc-devs@haskell.org Subject: Fwd: Type checking expressions Hello everyo

Fwd: Type checking expressions

2018-03-02 Thread Peter Podlovics
Hello everyone, I would like to ask for some advice regarding the type checker part of GHC. My goal is to determine the type of every expression, pattern etc. in the syntax tree. Currently the compiler doesn't store this information, so I have to type check manually. One important aspect is that