Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 33 additions & 39 deletions primer/test/Tests/Action/Prog.hs
Original file line number Diff line number Diff line change
Expand Up @@ -895,22 +895,20 @@ unit_RenameCon =
sequence
[ do
x <-
hole
( hole $
case_
( con
cA
[ con0 (vcn "True")
, con0 (vcn "True")
, con0 (vcn "True")
]
`ann` (tcon tT `tapp` tEmptyHole `tapp` tEmptyHole)
)
[ branch cA [("p", Nothing), ("q", Nothing), ("p1", Nothing)] emptyHole
, branch cB [("r", Nothing), ("x", Nothing)] emptyHole
hole $
case_
( con
cA
[ con0 (vcn "True")
, con0 (vcn "True")
, con0 (vcn "True")
]
`ann` tEmptyHole
)
`ann` (tcon tT `tapp` tEmptyHole `tapp` tEmptyHole)
)
[ branch cA [("p", Nothing), ("q", Nothing), ("p1", Nothing)] emptyHole
, branch cB [("r", Nothing), ("x", Nothing)] emptyHole
]
`ann` tEmptyHole
astDef "def" x <$> tEmptyHole
]
)
Expand All @@ -926,22 +924,20 @@ unit_RenameCon =
forgetMetadata (astDefExpr def)
@?= forgetMetadata
( create' $
hole
( hole $
case_
( con
(vcn "A'")
[ con0 (vcn "True")
, con0 (vcn "True")
, con0 (vcn "True")
]
`ann` (tcon tT `tapp` tEmptyHole `tapp` tEmptyHole)
)
[ branch (vcn "A'") [("p", Nothing), ("q", Nothing), ("p1", Nothing)] emptyHole
, branch cB [("r", Nothing), ("x", Nothing)] emptyHole
hole $
case_
( con
(vcn "A'")
[ con0 (vcn "True")
, con0 (vcn "True")
, con0 (vcn "True")
]
`ann` tEmptyHole
)
`ann` (tcon tT `tapp` tEmptyHole `tapp` tEmptyHole)
)
[ branch (vcn "A'") [("p", Nothing), ("q", Nothing), ("p1", Nothing)] emptyHole
, branch cB [("r", Nothing), ("x", Nothing)] emptyHole
]
`ann` tEmptyHole
)

unit_RenameCon_clash :: Assertion
Expand All @@ -952,15 +948,13 @@ unit_RenameCon_clash =
[ do
x <-
hole
( hole
( con
cA
[ emptyHole
, emptyHole
, emptyHole
]
`ann` (tcon tT `tapp` tEmptyHole `tapp` tEmptyHole)
)
( con
cA
[ emptyHole
, emptyHole
, emptyHole
]
`ann` (tcon tT `tapp` tEmptyHole `tapp` tEmptyHole)
)
astDef "def" x <$> tEmptyHole
]
Expand Down