Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
6effb9e6
Commit
6effb9e6
authored
Dec 04, 2007
by
simonpj@microsoft.com
Browse files
Make HscTypes.tyThingId respond not panic on ADataCon
parent
942fd046
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/main/HscTypes.lhs
View file @
6effb9e6
...
...
@@ -96,7 +96,7 @@ import Type
import Class ( Class, classSelIds, classATs, classTyCon )
import TyCon
import DataCon ( DataCon, dataConImplicitIds )
import DataCon ( DataCon, dataConImplicitIds
, dataConWrapId
)
import PrelNames ( gHC_PRIM )
import Packages hiding ( Version(..) )
import DynFlags ( DynFlags(..), isOneShot, HscTarget (..) )
...
...
@@ -959,8 +959,9 @@ tyThingDataCon (ADataCon dc) = dc
tyThingDataCon other = pprPanic "tyThingDataCon" (pprTyThing other)
tyThingId :: TyThing -> Id
tyThingId (AnId id) = id
tyThingId other = pprPanic "tyThingId" (pprTyThing other)
tyThingId (AnId id) = id
tyThingId (ADataCon dc) = dataConWrapId dc
tyThingId other = pprPanic "tyThingId" (pprTyThing other)
\end{code}
%************************************************************************
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment