
#13509: Perplexing type error -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: | LevityPolymorphism Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Even shorter repro case {{{ {-# LANGUAGE UnboxedTuples, MagicHash #-} module T13509 where import GHC.Exts import Data.Word selectPower :: Word# -> (# Word#, Word# #) selectPower base = go base where go :: Word# -> (# Word#, Word# #) go pw = let (# n, pw2n #) = go pw in (# n `timesWord#` 2##, pw2n #) }}} This compiles. Commenting out the signature for `go` makes it fail. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13509#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler