Merge MatchFixity and HsMatchContext
[ghc.git] / compiler / hsSyn / HsDoc.hs
1 {-# LANGUAGE CPP, DeriveDataTypeable #-}
2
3 module HsDoc (
4 HsDocString(..),
5 LHsDocString,
6 ppr_mbDoc
7 ) where
8
9 #include "HsVersions.h"
10
11 import Outputable
12 import SrcLoc
13 import FastString
14
15 import Data.Data
16
17 newtype HsDocString = HsDocString FastString
18 deriving (Eq, Show, Data)
19
20 type LHsDocString = Located HsDocString
21
22 instance Outputable HsDocString where
23 ppr (HsDocString fs) = ftext fs
24
25 ppr_mbDoc :: Maybe LHsDocString -> SDoc
26 ppr_mbDoc (Just doc) = ppr doc
27 ppr_mbDoc Nothing = empty
28