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
b54a4ee4
Commit
b54a4ee4
authored
May 26, 1997
by
sof
Browse files
[project @ 1997-05-26 04:47:12 by sof]
Updated imports
parent
d9842062
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/deSugar/Match.lhs
View file @
b54a4ee4
...
...
@@ -32,7 +32,7 @@ import Id ( idType, dataConFieldLabels,
GenId{-instance-}, SYN_IE(Id)
)
import Name ( Name {--O only-} )
import
PprSty
le
( PprStyle(..) )
import
Outputab
le ( PprStyle(..)
, Outputable(..)
)
import PprType ( GenType{-instance-}, GenTyVar{-ditto-} )
import Pretty ( Doc )
import PrelVals ( pAT_ERROR_ID )
...
...
@@ -51,10 +51,6 @@ import TysWiredIn ( nilDataCon, consDataCon, mkTupleTy, mkListTy,
)
import Unique ( Unique{-instance Eq-} )
import Util ( panic, pprPanic, assertPanic )
#if __GLASGOW_HASKELL__ >= 202
import Outputable ( Outputable(..) )
#endif
\end{code}
The function @match@ is basically the same as in the Wadler chapter,
...
...
@@ -337,7 +333,7 @@ tidy1 v (RecPat con_id pat_ty rpats) match_result
pats = map mk_pat tagged_arg_tys
-- Boring stuff to find the arg-tys of the constructor
(_, inst_tys, _) =
{-trace "Match.getAppDataTyConExpandingDicts" $-}
getAppDataTyConExpandingDicts pat_ty
(_, inst_tys, _) = getAppDataTyConExpandingDicts pat_ty
con_arg_tys' = dataConArgTys con_id inst_tys
tagged_arg_tys = con_arg_tys' `zip` (dataConFieldLabels con_id)
...
...
ghc/compiler/deSugar/MatchCon.lhs
View file @
b54a4ee4
...
...
@@ -17,7 +17,7 @@ import DsHsSyn ( outPatType )
import DsMonad
import DsUtils
import Id (
isDataCon,
GenId{-instances-}, SYN_IE(Id) )
import Id ( GenId{-instances-}, SYN_IE(Id) )
import Util ( panic, assertPanic )
\end{code}
...
...
@@ -89,8 +89,7 @@ Wadler's chapter in SLPJ.
match_cons_used _ [{- no more eqns -}] _ = returnDs []
match_cons_used vars eqns_info@(EqnInfo (ConPat data_con _ arg_pats : ps1) _ : eqns) shadows
= ASSERT(isDataCon data_con)
let
= let
(eqns_for_this_con, eqns_not_for_this_con) = splitByCon eqns_info
(shadows_for_this_con, shadows_not_for_this_con) = splitByCon shadows
in
...
...
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