
#8412: TH allows negative type-level integers -------------------------------------+------------------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: GHC accepts Difficulty: Easy (less than 1 | invalid program hour) | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- Similar to #8306, it is possible to create type-level -1 via {{{ type T = $(return $ LitT $ NumTyLit (-1)) }}} Easy to fix with new TH by moving the check from parser to renamer. I'm preparing a patch. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8412 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler