From 7f3524efcbd58ca6837ec0ffca6ddd121d64e4de Mon Sep 17 00:00:00 2001 From: Daniel Rogozin Date: Wed, 27 May 2020 13:35:24 +0300 Subject: The Char kind (#11342) Co-authored-by: Rinat Stryungis Implement GHC Proposal #387 * Parse char literals 'x' at the type level * New built-in type families CmpChar, ConsSymbol, UnconsSymbol * New KnownChar class (cf. KnownSymbol and KnownNat) * New SomeChar type (cf. SomeSymbol and SomeNat) * CharTyLit support in template-haskell Updated submodules: binary, haddock. Metric Decrease: T5205 haddock.base Metric Increase: Naperian T13035 --- compiler/Language/Haskell/Syntax/Type.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/Language') diff --git a/compiler/Language/Haskell/Syntax/Type.hs b/compiler/Language/Haskell/Syntax/Type.hs index 6b0d61d025..0427fd65f3 100644 --- a/compiler/Language/Haskell/Syntax/Type.hs +++ b/compiler/Language/Haskell/Syntax/Type.hs @@ -910,6 +910,7 @@ type HsCoreTy = Type data HsTyLit = HsNumTy SourceText Integer | HsStrTy SourceText FastString + | HsCharTy SourceText Char deriving Data -- | Denotes the type of arrows in the surface language @@ -1302,3 +1303,4 @@ instance Outputable HsTyLit where ppr_tylit :: HsTyLit -> SDoc ppr_tylit (HsNumTy source i) = pprWithSourceText source (integer i) ppr_tylit (HsStrTy source s) = pprWithSourceText source (text (show s)) +ppr_tylit (HsCharTy source c) = pprWithSourceText source (text (show c)) -- cgit v1.2.1