Skip to content

Template Haskell + -fdicts-strict fails

module Foo where

import Language.Haskell.TH

foo :: Q Name
foo = do
	VarE x <- [| (>>=) |]
	return x

When compiled with -fdicts-strict -XTemplateHaskell, the resulting Core contains

Foo.foo3 :: forall (m_aPo :: * -> *). Functor m_aPo
GblId

Foo.foo3 =
  \ (@ m_aPo::* -> *) ->
    Control.Exception.Base.runtimeError
      @ Functor m_aPo
      "Oops!  Entered absent arg ww_sQJ{v} [lid] <pred>base:Functor{tc 2a} m{tv aPo} [tv]"
Trac metadata
Trac field Value
Version 6.12.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown/Multiple
Architecture Unknown/Multiple
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information