Skip to content

Commit

Permalink
Merge multiple runEnvironmentT
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaisorblade committed Feb 6, 2015
1 parent 3003413 commit 2d05377
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src-lib/PTS/Process/File.hs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,12 @@ processStmt (Bind n args (Just body') body) = recover () $ do
env <- getBindings

-- typecheck type
qq <- runEnvironmentT (typecheckPull t'') env
runEnvironmentT
(checkProperType qq (text "in top-level binding of " <+> pretty 0 n) (text ""))
env
qq <-
flip runEnvironmentT env $
do
qq <- typecheckPull t''
checkProperType qq (text "in top-level binding of " <+> pretty 0 n) (text "")
return qq

-- use declared type to typecheck push
qq <- liftEval (eval qq)
Expand Down

0 comments on commit 2d05377

Please sign in to comment.