haskell / haskell/stylish-haskell

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

Open
#340 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Haskell
Stars
1k
Forks
153
PR merge metrics
No merged PRs in 30d

Description

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.

```haskel
{-# 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)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.