Skip to content
Snippets Groups Projects
Commit bb8560a1 authored by Simon Marlow's avatar Simon Marlow
Browse files

[haddock @ 2002-04-10 16:10:26 by simonmar]

Now we understand (or at least don't barf on) type signatures in
patterns such as you might find when scoped type variables are in use.
parent 76bd7b34
No related merge requests found
-----------------------------------------------------------------------------
-- $Id: HsParseUtils.lhs,v 1.1 2002/04/04 16:23:43 simonmar Exp $
-- $Id: HsParseUtils.lhs,v 1.2 2002/04/10 16:10:26 simonmar Exp $
--
-- (c) The GHC Team 1997-2000
--
......@@ -121,6 +121,8 @@ checkPat e [] = case e of
HsRecConstr c fs -> mapP checkPatField fs `thenP` \fs ->
returnP (HsPRec c fs)
HsNegApp (HsLit l) -> returnP (HsPNeg (HsPLit l))
HsExpTypeSig l e ty -> checkPat e [] `thenP` \e ->
returnP (HsPTypeSig e ty)
_ -> patFail
checkPat _ _ = patFail
......
% -----------------------------------------------------------------------------
% $Id: HsSyn.lhs,v 1.1 2002/04/04 16:23:43 simonmar Exp $
% $Id: HsSyn.lhs,v 1.2 2002/04/10 16:10:26 simonmar Exp $
%
% (c) The GHC Team, 1997-2002
%
......@@ -228,6 +228,7 @@ data HsPat
| HsPAsPat HsName HsPat
| HsPWildCard
| HsPIrrPat HsPat
| HsPTypeSig HsPat HsType
deriving (Eq,Show)
data HsPatField
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment