Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

`hsExprType` of a record construction returns the type of the constructor, not the constructee
Let's say I have some Haskell code like this: ``` data MyRec = MkMyRec { myField :: [Double] } foo = MkMyRec{ myField = [3.6] ``` The type of `foo` is of course correctly inferred as `MyRec`. But if I take the typechecked AST of its right-hand side, `hsExprType` returns `[Double] -> MyRec` as its type instead. I believe this is because of this clause of `hsExprType` in `GHC.Hs.Syn.Type`: ``` hsExprType (RecordCon con_expr _ _) = hsExprType con_expr ``` The `con_expr` stored in `RecordCon`'s extension point for `GhcTc` is the constructor: ``` type instance XRecordCon GhcTc = PostTcExpr -- Instantiated constructor function ``` so of course `hsExprType con_expr` will return the constructor type.
issue