haskell / haskell/stylish-haskell

CPP mangling

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

Description

I tried having this in my Haskell source:

```haskell
{-# LANGUAGE CPP #-}

module Foo where

import Prelude ()

import Prelude.Compat hiding ((<$>)
#if MIN_VERSION_base_compat (0,9,3)
, (<>)
#endif
)

...haskell
{-# LANGUAGE CPP #-}

module Foo where

import Prelude ()

import Prelude.Compat hiding ((<$>), (<>))
```

(Note: this happens no matter what CPP macro it's testing is, whether it evalutes to true or false.)
However, running stylish-haskell on this seems to ignore the CPP here and simplifies this to:

```

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.