GADT constructors remove the space in signature #217

Open
opened 2019-02-06 00:56:45 +01:00 by ProofOfKeags · 6 comments
ProofOfKeags commented 2019-02-06 00:56:45 +01:00 (Migrated from github.com)

Brittany is pulling the space out from between the :: and the type immediately following the ::

corrects this:

data MyGADT a where
  Constructor1 :: Int -> MyGADT Int

to this:

data MyGADT a where
  Constructor1 ::Int -> MyGADT Int

Personally I'm not a fan of this and I'm guessing it's not intentional? If it is intentional, is it configurable?

Brittany is pulling the space out from between the `::` and the type immediately following the `::` corrects this: ```haskell data MyGADT a where Constructor1 :: Int -> MyGADT Int ``` to this: ```haskell data MyGADT a where Constructor1 ::Int -> MyGADT Int ``` Personally I'm not a fan of this and I'm guessing it's not intentional? If it is intentional, is it configurable?
matt-noonan commented 2019-02-11 16:07:26 +01:00 (Migrated from github.com)

I can't reproduce this on master, datadecl, or the 0.11.0.0 release. Can you add more information?

I can't reproduce this on `master`, `datadecl`, or the `0.11.0.0` release. Can you add more information?
ProofOfKeags commented 2019-02-11 18:19:16 +01:00 (Migrated from github.com)

It's possible this was only happening on an older version. Lemme see if I can pull more details together, as well as update to master and see if it's still happening.

It's possible this was only happening on an older version. Lemme see if I can pull more details together, as well as update to master and see if it's still happening.
expipiplus1 commented 2019-05-04 13:35:35 +02:00 (Migrated from github.com)

I'm getting this with 0.11.0.0

data A where
  A ::A
I'm getting this with 0.11.0.0 ```haskell data A where A ::A ```
tfausak commented 2019-06-18 03:50:30 +02:00 (Migrated from github.com)

Seems like a bug, separate from other related issues like #47.

Seems like a bug, separate from other related issues like #47.
ElvishJerricco commented 2019-08-29 04:12:36 +02:00 (Migrated from github.com)

Seeing this as well on brittany 0.12.0.0, as currently released on nixpkgs-unstable.

Seeing this as well on brittany 0.12.0.0, as currently released on nixpkgs-unstable.
Gipphe commented 2021-06-09 21:34:56 +02:00 (Migrated from github.com)

Still seeing this on brittany 0.13.1.2 installed from a clone of the repo using stack.

data Foo m a where
    Foo :: Bar -> Foo m Baz

becomes

data Foo m a where
    Foo ::Bar -> Foo m Baz

A concrete example from a project I'm working on, just to add a real-world example where brittany removes the space:

data DB m a where
    GetAllStores ::DB m [Store]
    RunDB ::DBStack r -> DB m r
Still seeing this on brittany 0.13.1.2 installed from a clone of the repo using stack. ```haskell data Foo m a where Foo :: Bar -> Foo m Baz ``` becomes ```haskell data Foo m a where Foo ::Bar -> Foo m Baz ``` A concrete example from a project I'm working on, just to add a real-world example where brittany removes the space: ```haskell data DB m a where GetAllStores ::DB m [Store] RunDB ::DBStack r -> DB m r ```
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#217
There is no content yet.