Use : in syntax for union types

This commit is contained in:
Gabriel Gonzalez 2016-10-16 08:21:47 -07:00
parent 48144b5b92
commit ac49ae5fcc
2 changed files with 3 additions and 3 deletions

View File

@ -607,7 +607,7 @@ buildTagTypes [a] = buildTagType a
buildTagTypes (a:bs) = buildTagType a <> " | " <> buildTagTypes bs
buildTagType :: Buildable a => (Text, Expr a) -> Builder
buildTagType (a, b) = build a <> " " <> buildExpr0 b
buildTagType (a, b) = build a <> " : " <> buildExpr0 b
buildUnionLit :: Buildable a => Text -> Expr a -> Map Text (Expr a) -> Builder
buildUnionLit a b c

View File

@ -339,8 +339,8 @@ UnionLit
{ UnionLit $2 $4 (Data.Map.fromList $6) }
TagType
: label Expr0
{ ($1, $2) }
: label ':' Expr0
{ ($1, $3) }
Import
: file