Support pattern synonyms #199

Closed
opened 2018-11-12 18:18:59 +01:00 by mkaput · 5 comments
mkaput commented 2018-11-12 18:18:59 +01:00 (Migrated from github.com)

As of 9d91523 Brittany crashes on pattern synonyms:

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}

module Main where

pattern Foo pk <- (Just pk)
As of 9d91523 Brittany crashes on pattern synonyms: ```haskell {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ViewPatterns #-} module Main where pattern Foo pk <- (Just pk) ```
tomjaguarpaw commented 2019-02-28 12:25:51 +01:00 (Migrated from github.com)

I would like this too, please!

I would like this too, please!
asheshambasta commented 2019-04-28 15:42:47 +02:00 (Migrated from github.com)

I might be doing something really wrong; but it seems to me that is also removes pattern in import statements:

import           Data.Types                     ( PairData'(..)
                                                , pattern OnlineP
                                                )

Becomes:

import           Data.Types                     ( PairData'(..)
                                                , OnlineP
                                                )

Which is invalid.
Adding --brittany-disable-next-binding anywhere before this import statement makes no difference.

I might be doing something really wrong; but it seems to me that is also removes `pattern` in import statements: ```haskell import Data.Types ( PairData'(..) , pattern OnlineP ) ``` Becomes: ```haskell import Data.Types ( PairData'(..) , OnlineP ) ``` Which is invalid. Adding `--brittany-disable-next-binding` anywhere before this import statement makes no difference.
tfausak commented 2019-06-18 04:15:00 +02:00 (Migrated from github.com)

The pattern import thing has been fixed. See #204.

As for the original issue, this is enough to trigger the problem:

{-# LANGUAGE PatternSynonyms #-}
pattern Foo pk <- (Just pk)
The pattern import thing has been fixed. See #204. As for the original issue, this is enough to trigger the problem: ``` hs {-# LANGUAGE PatternSynonyms #-} pattern Foo pk <- (Just pk) ```
runarorama commented 2020-02-26 16:03:02 +01:00 (Migrated from github.com)

Any hints on where to look if I wanted to take a stab at fixing this issue?

Any hints on where to look if I wanted to take a stab at fixing this issue?
andys8 commented 2020-07-23 12:35:56 +02:00 (Migrated from github.com)

This fix was merged in march, but there was no release since then. Is there a plann to do a release @lspitzner ? :)

This fix was merged in march, but there was no release since then. Is there a plann to do a release @lspitzner ? :)
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hexagoxel/brittany#199
There is no content yet.