info and type sub-commands also need TH check

This commit is contained in:
eagletmt 2013-03-14 22:41:52 +09:00
parent 639147db66
commit 6e8d7bd823
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@
module Info (infoExpr, typeExpr) where
import Control.Applicative
import Control.Monad (when)
import CoreUtils
import Data.Function
import Data.Generics
@ -145,11 +146,15 @@ inModuleContext opt cradle fileName modstr action errmsg =
valid = do
_ <- initializeFlagsWithCradle opt cradle ["-w"] False
setTargetFile fileName
slow <- needsTemplateHaskell <$> depanal [] False
when slow setSlowDynFlags
_ <- load LoadAllTargets
doif setContextFromTarget action
invalid = do
_ <- initializeFlagsWithCradle opt cradle ["-w"] False
setTargetBuffer
slow <- needsTemplateHaskell <$> depanal [] False
when slow setSlowDynFlags
_ <- load LoadAllTargets
doif setContextFromTarget action
setTargetBuffer = do