-
-
Notifications
You must be signed in to change notification settings - Fork 391
Various strictness improvements #3413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
{-# LANGUAGE LambdaCase #-} | ||
{-# LANGUAGE TypeFamilies #-} | ||
{-# LANGUAGE ViewPatterns #-} | ||
{-# LANGUAGE BangPatterns #-} | ||
|
||
module Ide.Plugin.Class.Types where | ||
|
||
|
@@ -45,7 +46,7 @@ data GetInstanceBindTypeSigs = GetInstanceBindTypeSigs | |
|
||
data InstanceBindTypeSig = InstanceBindTypeSig | ||
{ bindName :: Name | ||
, bindRendered :: T.Text | ||
, bindRendered :: !T.Text | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason this needs to be strict while the other values arent? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It showed up in a profile, the others are likely to already be evaluated I think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then a comment would be nice. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it seems clearer to bang everything in situations like this? Unsure. |
||
, bindDefSpan :: Maybe SrcSpan | ||
-- ^SrcSpan for the bind definition | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out that reusing the same
ModDetails
as we had last time can keep the previousHscEnv
and correspondingHomePackageTable
data structures alive. Solution is to delete this code and always regenerate theModDetails
from the interface.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!! Very important to do this (and cheap)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a cautionary note? should we somehow get rid of
old_value
entirely? or is it okay to use it so long as we don't retain anything from it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need it for the old
ModIface
(which is safe to use).