1
0
forked from GitHub/gf-core

make it possible to override opers defined in an interface by syntax 'instance Foo of Bar - [f,g,h]'

This commit is contained in:
aarne
2011-03-12 11:24:14 +00:00
parent 3ddc29f2dc
commit 7361ddea45
6 changed files with 17 additions and 15 deletions

View File

@@ -132,11 +132,11 @@ ComplMod
ModType :: { (ModuleType,Ident) }
ModType
: 'abstract' Ident { (MTAbstract, $2) }
| 'resource' Ident { (MTResource, $2) }
| 'interface' Ident { (MTInterface, $2) }
| 'concrete' Ident 'of' Ident { (MTConcrete $4, $2) }
| 'instance' Ident 'of' Ident { (MTInstance $4, $2) }
: 'abstract' Ident { (MTAbstract, $2) }
| 'resource' Ident { (MTResource, $2) }
| 'interface' Ident { (MTInterface, $2) }
| 'concrete' Ident 'of' Ident { (MTConcrete $4, $2) }
| 'instance' Ident 'of' Included { (MTInstance $4, $2) }
ModHeaderBody :: { ( [(Ident,MInclude)]
, Maybe (Ident,MInclude,[(Ident,Ident)])

View File

@@ -61,7 +61,7 @@ ppModule q (mn, ModInfo mtype mstat opts exts with opens _ jments) =
MTResource -> text "resource" <+> ppIdent mn
MTConcrete abs -> text "concrete" <+> ppIdent mn <+> text "of" <+> ppIdent abs
MTInterface -> text "interface" <+> ppIdent mn
MTInstance int -> text "instance" <+> ppIdent mn <+> text "of" <+> ppIdent int
MTInstance ie -> text "instance" <+> ppIdent mn <+> text "of" <+> ppExtends ie
ppExtends (id,MIAll ) = ppIdent id
ppExtends (id,MIOnly incs) = ppIdent id <+> brackets (commaPunct ppIdent incs)