Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
head.hackage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hécate Kleidukos
head.hackage
Commits
ae085a75
Commit
ae085a75
authored
4 years ago
by
Ryan Scott
Browse files
Options
Downloads
Patches
Plain Diff
Adapt inspection-testing to Tickish-related changes
parent
355073b8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/inspection-testing-0.4.3.0.patch
+31
-7
31 additions, 7 deletions
patches/inspection-testing-0.4.3.0.patch
with
31 additions
and
7 deletions
patches/inspection-testing-0.4.3.0.patch
+
31
−
7
View file @
ae085a75
diff --git a/src/Test/Inspection/Core.hs b/src/Test/Inspection/Core.hs
index 7816010..
265d3ba
100644
index 7816010..
45ec4b6
100644
--- a/src/Test/Inspection/Core.hs
+++ b/src/Test/Inspection/Core.hs
@@ -83,7 +83,12 @@
slice binds v
@@ -44,6 +44,10 @@
import DataCon
import TyCon (TyCon, isClassTyCon)
#endif
+#if MIN_VERSION_ghc(9,1,0)
+import GHC.Types.Tickish (CoreTickish, GenTickish(..))
+#endif
+
import qualified Data.Set as S
import Control.Monad.State.Strict
import Control.Monad.Trans.Maybe
@@ -83,7 +87,12 @@
slice binds v
go (Type _) = pure ()
go (Coercion _) = pure ()
...
...
@@ -16,7 +27,7 @@ index 7816010..265d3ba 100644
-- | Pretty-print a slice
pprSlice :: Slice -> SDoc
@@ -211,
7
+2
16,11
@@
eqSlice it slice1 slice2
@@ -211,
14
+2
20,22
@@
eqSlice it slice1 slice2
go _ _ _ = guard False
-----------
...
...
@@ -27,8 +38,21 @@ index 7816010..265d3ba 100644
+#endif
= guard (c1 == c2) >> go (rnBndrs2 env bs1 bs2) e1 e2
go_tick :: RnEnv2 -> Tickish Id -> Tickish Id -> Bool
@@ -250,7 +259,12 @@
allTyCons ignore slice =
- go_tick :: RnEnv2 -> Tickish Id -> Tickish Id -> Bool
- go_tick env (Breakpoint lid lids) (Breakpoint rid rids)
+ go_tick :: RnEnv2 -> CoreTickish -> CoreTickish -> Bool
+ go_tick env (Breakpoint{breakpointId = lid, breakpointFVs = lids})
+ (Breakpoint{breakpointId = rid, breakpointFVs = rids})
= lid == rid && map (rnOccL env) lids == map (rnOccR env) rids
go_tick _ l r = l == r
+#if !MIN_VERSION_GLASGOW_HASKELL(9,1,0,0)
+type CoreTickish = Tickish Id
+#endif
-- | Returns @True@ if the given core expression mentions no type constructor
@@ -250,7 +267,12 @@
allTyCons ignore slice =
goB (b, e) = goV b ++ go e
...
...
@@ -42,7 +66,7 @@ index 7816010..265d3ba 100644
goT (TyVarTy _) = []
goT (AppTy t1 t2) = goT t1 ++ goT t2
@@ -296,7 +31
0
,12 @@
freeOfTerm slice needles = listToMaybe [ (v,e) | (v,e) <- slice, not (go e) ]
@@ -296,7 +31
8
,12 @@
freeOfTerm slice needles = listToMaybe [ (v,e) | (v,e) <- slice, not (go e) ]
goB (_, e) = go e
...
...
@@ -56,7 +80,7 @@ index 7816010..265d3ba 100644
goAltCon (DataAlt dc) | isNeedle (dataConName dc) = False
goAltCon _ = True
@@ -343,7 +3
62
,12 @@
doesNotAllocate slice = listToMaybe [ (v,e) | (v,e) <- slice, not (go (idArity v
@@ -343,7 +3
70
,12 @@
doesNotAllocate slice = listToMaybe [ (v,e) | (v,e) <- slice, not (go (idArity v
-- A let binding allocates if any variable is not a join point and not
-- unlifted
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment