1{-# LANGUAGE LambdaCase #-}
2{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE RecordWildCards #-}
4{-# LANGUAGE TypeFamilies #-}
6-- | Rendering of Role annotation declarations.
8module Ormolu.Printer.Meat.Declaration.RoleAnnotation
15import Ormolu.Printer.Combinators
16import Ormolu.Printer.Meat.Common
18import RdrName (RdrName (..))
19import SrcLoc (Located)
21p_roleAnnot :: RoleAnnotDecl GhcPs -> R ()
23 RoleAnnotDecl NoExt l_name anns -> p_roleAnnot' l_name anns
24 XRoleAnnotDecl _ -> notImplemented "XRoleAnnotDecl"
26p_roleAnnot' :: Located RdrName -> [Located (Maybe Role)] -> R ()
27p_roleAnnot' l_name anns = line $ do
34 p_role' = maybe (txt "_") p_role
35 inci $ velt' $ (located' p_role') <$> anns
39 Nominal -> txt "nominal"
40 Representational -> txt "representational"
41 Phantom -> txt "phantom"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list