
#14180: Strange/bad error message binding unboxed type variable -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.2.3 Component: Compiler (Type | Version: 8.3 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Replying to [comment:7 simonpj]:
But do you really want unboxed types in kinds??
...Yes? I mean, that's what dfeuer was presumably trying to do in the original program. But moreover, I find it rather strange that the typing rule for `(->)` is less general in kinds than it is in types. I don't care so much about removing the `TypeLevel`/`KindLevel` distinction, especially if keeping it will improve error message quality elsewhere. But I do think that we shouldn't check for this distinction in `tc_fun_type`. ...However, it should be noted that I tried implementing that `tc_fun_type` suggestion, but even still that doesn't make the original program (the `MatchInt` one) typecheck, so I guess my hunch was misplaced. For some reason, GHC expects the type of all type variables to have kind `Type` (as opposed to how things work on the value level, where they can have kind `TYPE r` for some `RuntimeRep` `r`). I'm not sure where that is decided, but it's not `tc_fun_type` it seems. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14180#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler