Skip to content

Ormolu support for ExplicitLevelImports #1192

@guibou

Description

@guibou

Describe the bug

Ormolu will drop the splice (or quote) import informations when the code use ExplicitLevelImports.

To Reproduce

Test.hs:

{-# LANGUAGE ExplicitLevelImports #-}
import splice PyF (fmt)
import PyF

ormolu Test.hs:

Test.hs
@@ -1,3 +1,4 @@
  {-# LANGUAGE ExplicitLevelImports #-}
- import splice PyF (fmt)
+
  import PyF
+ import PyF (fmt)

  AST of input and AST of formatted code differ.
    at Test.hs:2:1-23
  Please, consider reporting the bug.
  To format anyway, use --unsafe.

See how it dropped the splice

Expected behavior

Ormolu should correctly handle splice and quote

Environment

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions