fix evil parser bug (it was a fucking typo)
This commit is contained in:
@@ -253,8 +253,10 @@ instance Pretty Type where
|
|||||||
prettyPrec _ (TyVar n) = ttext n
|
prettyPrec _ (TyVar n) = ttext n
|
||||||
prettyPrec _ TyFun = "(->)"
|
prettyPrec _ TyFun = "(->)"
|
||||||
prettyPrec _ (TyCon n) = ttext n
|
prettyPrec _ (TyCon n) = ttext n
|
||||||
prettyPrec p (TyApp f x) = maybeParens (p>0) $
|
prettyPrec p (a :-> b) = maybeParens (p>0) $
|
||||||
prettyPrec 0 f <+> prettyPrec 1 x
|
hsep [prettyPrec 1 a, "->", prettyPrec 0 b]
|
||||||
|
prettyPrec p (TyApp f x) = maybeParens (p>1) $
|
||||||
|
prettyPrec 1 f <+> prettyPrec 2 x
|
||||||
|
|
||||||
instance (Pretty b) => Pretty (ScDef b) where
|
instance (Pretty b) => Pretty (ScDef b) where
|
||||||
pretty sc = hsep [name, as, "=", hang empty 1 e, ";"]
|
pretty sc = hsep [name, as, "=", hang empty 1 e, ";"]
|
||||||
|
|||||||
@@ -90,10 +90,9 @@ Decls : Decl ';' Decls { $1 : $3 }
|
|||||||
| Decl { [$1] }
|
| Decl { [$1] }
|
||||||
|
|
||||||
DeclsV :: { [Decl' RlpcPs] }
|
DeclsV :: { [Decl' RlpcPs] }
|
||||||
DeclsV : Decl VS Decls { $1 : $3 }
|
DeclsV : Decl VS DeclsV { $1 : $3 }
|
||||||
| Decl VS { [$1] }
|
| Decl VS { [$1] }
|
||||||
| Decl { [$1] }
|
| Decl { [$1] }
|
||||||
| {- epsilon -} { [] }
|
|
||||||
|
|
||||||
VS :: { Located RlpToken }
|
VS :: { Located RlpToken }
|
||||||
VS : ';' { $1 }
|
VS : ';' { $1 }
|
||||||
|
|||||||
Reference in New Issue
Block a user