1
0
forked from GitHub/gf-core

Two fixes in GF.Grammar.Canonical

+ Hide Prelude.<> to avoid ambiguity with ghc-8.6
+ Vertical alternative in the pretty printer for table types A => B
This commit is contained in:
Thomas Hallgren
2019-01-18 14:44:45 +01:00
parent fc1b51aa95
commit 71307d6518

View File

@@ -2,6 +2,7 @@
-- high-level constructions such as functors and opers have been eliminated -- high-level constructions such as functors and opers have been eliminated
-- by partial evaluation. -- by partial evaluation.
module GF.Grammar.Canonical where module GF.Grammar.Canonical where
import Prelude hiding ((<>))
import GF.Text.Pretty import GF.Text.Pretty
-- | A Complete grammar -- | A Complete grammar
@@ -169,7 +170,7 @@ instance Pretty LinType where
ParamType pt -> pp pt ParamType pt -> pp pt
RecordType rs -> block rs RecordType rs -> block rs
StrType -> pp "Str" StrType -> pp "Str"
TableType pt lt -> pt <+> "=>" <+> lt TableType pt lt -> sep [pt <+> "=>",pp lt]
TupleType lts -> "<"<>punctuate "," lts<>">" TupleType lts -> "<"<>punctuate "," lts<>">"
instance RhsSeparator LinType where rhsSep _ = pp ":" instance RhsSeparator LinType where rhsSep _ = pp ":"