Skip to content

Example formatted output in the Example section of README is not actually possible #340

@brennancheung

Description

@brennancheung

I'm looking at the Example section in the README and that is exactly how I want my code to be formatted but it doesn't seem to be possible. The deriving (Show) will only be put in a new line. Also, I can't find any way to get the first_field to not be indented past the indentation level of the data constructor (Point). Am I missing something or is this no longer possible?

Has this styling option been deliberately deprecated? If so, then sounds like the example needs to be updated. If it is still possible, I would love to know the configuration settings to achieve it.

{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables        #-}
{-# LANGUAGE TemplateHaskell            #-}

module Bad where

import           Control.Applicative ((<$>))
import           System.Directory    (doesFileExist)

import           Data.Map            (Map, keys, (!))
import qualified Data.Map            as M

data Point = Point
    { pointX, pointY :: Double
    , pointName      :: String
    } deriving (Show)

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