Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
alanz committed Jan 7, 2023
1 parent 3981354 commit 7e44487
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
7 changes: 6 additions & 1 deletion configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ rm -fr dist*

# cabal configure -fdev --enable-tests --with-compiler=ghc-9.4.2
# cabal configure -fdev --enable-tests --with-compiler=ghc-9.4.3
# cabal configure -fdev --enable-tests --with-compiler=ghc-9.4.4

# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.5.0.20221014/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.5.20221014/bin/ghc
cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.5.20221108/bin/ghc
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.5.20221108/bin/ghc

# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.5.20221122/bin/ghc --allow-newer
cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.7.20221228/bin/ghc --allow-newer

16 changes: 0 additions & 16 deletions src/Language/Haskell/GHC/ExactPrint/Transform.hs
Original file line number Diff line number Diff line change
Expand Up @@ -791,20 +791,6 @@ anchorFromLocatedA (L (EpAnnS anc _ _) _) = anchor anc
-- `MovedAnchor` operation based on the original location, only if it
-- does not already have one.
commentOrigDelta :: LEpaComment -> LEpaComment
-- commentOrigDelta (L (GHC.Anchor la _) (GHC.EpaComment t pp))
-- = (L (GHC.Anchor la op) (GHC.EpaComment t pp))
-- `debug` ("commentOrigDelta: (la, pp, r,c, op)=" ++ showAst (la, pp, r,c, op))
-- where
-- (r,c) = ss2posEnd pp

-- op' = if r == 0
-- then MovedAnchor (ss2delta (r,c+1) la)
-- -- then MovedAnchor (ss2delta (r,c+0) la)
-- -- else MovedAnchor (ss2delta (r,c) la)
-- else MovedAnchor (tweakDelta $ ss2delta (r,c) la)
-- op = if t == EpaEofComment && op' == MovedAnchor (SameLine 0)
-- then MovedAnchor (DifferentLine 1 0)
-- else op'
commentOrigDelta (L (EpaSpan la) (GHC.EpaComment t pp))
= (L op (GHC.EpaComment t pp))
`debug` ("commentOrigDelta: (la, pp, r,c, op)=" ++ showAst (la, pp, r,c, op))
Expand All @@ -813,8 +799,6 @@ commentOrigDelta (L (EpaSpan la) (GHC.EpaComment t pp))

op' = if r == 0
then EpaDelta (ss2delta (r,c+1) la) []
-- then MovedAnchor (ss2delta (r,c+0) la)
-- else MovedAnchor (ss2delta (r,c) la)
else EpaDelta (tweakDelta $ ss2delta (r,c) la) []
op = if t == EpaEofComment && op' == EpaDelta (SameLine 0) []
then EpaDelta (DifferentLine 1 0) []
Expand Down

0 comments on commit 7e44487

Please sign in to comment.