Support -XExplicitNamespaces #158

Closed
opened 2018-07-03 00:51:32 +02:00 by lspitzner · 0 comments
lspitzner commented 2018-07-03 00:51:32 +02:00 (Migrated from github.com)

From https://github.com/haskell/haskell-ide-engine/issues/666

{-# LANGUAGE ExplicitNamespaces #-}
module Test(type (++)) where

currently:

> clipread | brittany --dump-ast-full --output-on-errors
---- ast ----
A Just (Ann (DP (0,0)) [] [] [((AnnComment (Comment "{-# LANGUAGE ExplicitNamespaces #-}" stdin:1:1-35 Nothing)),DP (0,0)),((G AnnModule),DP (1,0)),((G AnnVal),DP (0,1)),((G AnnWhere),DP (0,1)),((G AnnEofPos),DP (1,0))] Nothing Nothing)
  HsModule
    Just (A (Nothing) {abstract:ModuleName})
    Just
      A Just (Ann (DP (0,0)) [] [] [((G AnnOpenP),DP (0,0)),((G AnnCloseP),DP (0,0))] Nothing Nothing)
        [ A Just (Ann (DP (0,0)) [] [] [] Nothing Nothing)
            IEThingAbs
              A Just (Ann (DP (0,0)) [] [] [((G AnnType),DP (0,0))] Nothing Nothing)
                IEType
                  A Just (Ann (DP (0,1)) [] [] [((G AnnOpenP),DP (0,0)),((G AnnVal),DP (0,0)),((G AnnCloseP),DP (0,0))] Nothing Nothing)
                    Unqual {OccName: ++}
        ]
    []
    []
    Nothing
    Nothing
ERROR: brittany pretty printer returned syntactically invalid result.
----
{-# LANGUAGE ExplicitNamespaces #-}
module Test
  ( ++
  )
where
From https://github.com/haskell/haskell-ide-engine/issues/666 ~~~~.hs {-# LANGUAGE ExplicitNamespaces #-} module Test(type (++)) where ~~~~ currently: ~~~~ > clipread | brittany --dump-ast-full --output-on-errors ---- ast ---- A Just (Ann (DP (0,0)) [] [] [((AnnComment (Comment "{-# LANGUAGE ExplicitNamespaces #-}" stdin:1:1-35 Nothing)),DP (0,0)),((G AnnModule),DP (1,0)),((G AnnVal),DP (0,1)),((G AnnWhere),DP (0,1)),((G AnnEofPos),DP (1,0))] Nothing Nothing) HsModule Just (A (Nothing) {abstract:ModuleName}) Just A Just (Ann (DP (0,0)) [] [] [((G AnnOpenP),DP (0,0)),((G AnnCloseP),DP (0,0))] Nothing Nothing) [ A Just (Ann (DP (0,0)) [] [] [] Nothing Nothing) IEThingAbs A Just (Ann (DP (0,0)) [] [] [((G AnnType),DP (0,0))] Nothing Nothing) IEType A Just (Ann (DP (0,1)) [] [] [((G AnnOpenP),DP (0,0)),((G AnnVal),DP (0,0)),((G AnnCloseP),DP (0,0))] Nothing Nothing) Unqual {OccName: ++} ] [] [] Nothing Nothing ERROR: brittany pretty printer returned syntactically invalid result. ---- {-# LANGUAGE ExplicitNamespaces #-} module Test ( ++ ) where ~~~~
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#158
There is no content yet.