aboutsummaryrefslogtreecommitdiff
path: root/src/HsParser.ly
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-06-03 13:05:58 +0000
committersimonmar <unknown>2002-06-03 13:05:58 +0000
commit613f21e3e09e2f9c9b6c24490b192811b6392b21 (patch)
tree1ec348eb29f908159081b0f32381276be94e970d /src/HsParser.ly
parentf93641d6fe818667bde3215364b9cb2de9a4dc41 (diff)
[haddock @ 2002-06-03 13:05:57 by simonmar]
Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case).
Diffstat (limited to 'src/HsParser.ly')
-rw-r--r--src/HsParser.ly5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/HsParser.ly b/src/HsParser.ly
index 4c12adc7..0fae07e4 100644
--- a/src/HsParser.ly
+++ b/src/HsParser.ly
@@ -1,5 +1,5 @@
-----------------------------------------------------------------------------
-$Id: HsParser.ly,v 1.12 2002/05/27 09:03:52 simonmar Exp $
+$Id: HsParser.ly,v 1.13 2002/06/03 13:05:58 simonmar Exp $
(c) Simon Marlow, Sven Panne 1997-2002
@@ -304,7 +304,8 @@ shift/reduce-conflict, so we don't handle this case here, but in bodyaux.
> {% checkDataHeader $2 `thenP` \(cs,c,t) ->
> returnP (HsNewTypeDecl $3 cs c t $5 $6 Nothing) }
> | 'class' srcloc ctype fds optcbody
-> { HsClassDecl $2 $3 $4 $5 Nothing}
+> {% checkClassHeader $3 `thenP` \(ctxt,n,tys) ->
+> returnP (HsClassDecl $2 ctxt n tys $4 $5 Nothing) }
> | 'instance' srcloc ctype optvaldefs
> {% checkInstHeader $3 `thenP` \(ctxt,asst) ->
> returnP (HsInstDecl $2 ctxt asst $4) }