Skip to content

Wingman/exactprint gets confused when a comment precedes a metaprogram #1943

@isovector

Description

@isovector
whats_it_deep_of
    :: (a -> a)
    -> [(Int, Either Bool (Maybe [a]))]
    -> [(Int, Either Bool (Maybe [a]))]
whats_it_deep_of f =
  -- The assumption here is necessary to tie-break in favor of the longest
  -- nesting of fmaps.
  [wingman| deep_of fmap, assumption |]

Running the metaprogram produces

whats_it_deep_of
    :: (a -> a)
    -> [(Int, Either Bool (Maybe [a]))]
    -> [(Int, Either Bool (Maybe [a]))]
whats_it_deep_of f = fmap (fmap (fmap (fmap (fmap f))))  -- The assumption here is necessary to tie-break in favor of the longest
  -- nesting of fmaps.
  [wingman| deep_of fmap, assumption |]

Notice that the metaprogram didn't get removed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: wingmantype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions