Skip to content

feature: marker to ignore the following block #409

Open
@imuli

Description

@imuli

I occasionally run into situations where I want to manually format a block, e.g. with servant-openapi3:

-- | The Work API
-- ...
data WorkAPI n mode = WorkAPI
   { workCreate :: mode
      :- Summary "Create a work from a design."
      :> Description "..."
      :> NamedRoutes (RunAPI (Design n) (WorkId n))
   , workIdDesignGet :: mode
      :- Summary "Fetch the most recent design on a work."
      :> Description "..."
      :> WorkId n :> "design" :> NamedRoutes (GetAPI (Design n))
   }
  deriving (Generic)

stylish-haskell, of course, will reformat that so each type definition is on a single line, which is what I want in most cases. This would also provide a workaround while waiting on a bug fix (or for me in the case of record GADTs with docs, bug filing!).

{- STYLISH ignore -} -- no special highlighting.
{-# STYLISH ignore #-} -- special highlighting, but makes ghc noisy without `-Wno-unrecognized-pragmas`
{-# ANN myDef ("STYLISH ignore" :: String) #-} -- extra special highlighting, but not usable for imports, verbose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions