-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support GHC 9.8.1 #1310
base: master
Are you sure you want to change the base?
Support GHC 9.8.1 #1310
Changes from 1 commit
fea7014
a95e012
34d5b26
17f5450
0fb535e
12ec9a2
b7f91c0
c048f90
99a3e06
7f26658
0dee20c
b889e82
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -659,8 +659,9 @@ enforceAcyclic | |
-> Eval e [(Term (Either l r), key, [key])] | ||
enforceAcyclic info cs = forM cs $ \c -> case c of | ||
AcyclicSCC v -> return v | ||
CyclicSCC vs -> do | ||
let i = if null vs then info else _tInfo $ view _1 $ head vs | ||
CyclicSCC [] -> error "Expected nonempty list" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous impl proceeded as usual binding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
CyclicSCC vs@(v:_) -> do | ||
let i = if null vs then info else _tInfo $ view _1 $ v | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, need to drop the |
||
pl = over (traverse . _3) (SomeDoc . prettyList) | ||
$ over (traverse . _1) (fmap mkSomeDoc) | ||
$ vs | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,11 +111,13 @@ runRegression p = do | |
(commit v) | ||
void $ begin v | ||
tids <- _txids pactdb user1 t1 v | ||
assertEquals "user txids" [1] tids | ||
assertEquals' "user txlogs" | ||
[TxLog "USER_user1" "key1" row, | ||
TxLog "USER_user1" "key1" row'] $ | ||
_getTxLog pactdb usert (head tids) v | ||
case tids of | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shall we still check |
||
tid:_ -> | ||
assertEquals' "user txlogs" | ||
[TxLog "USER_user1" "key1" row, | ||
TxLog "USER_user1" "key1" row'] $ | ||
_getTxLog pactdb usert tid v | ||
_ -> error "Expected nonempty list of tids" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't there an |
||
_writeRow pactdb Insert usert "key2" row v | ||
assertEquals' "user insert key2 pre-rollback" (Just row) (_readRow pactdb usert "key2" v) | ||
assertEquals' "keys pre-rollback" ["key1","key2"] $ _keys pactdb (UserTables user1) v | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1005,10 +1005,11 @@ toAST (TApp Term.App{..} _) = do | |
return app' | ||
Resume -> do | ||
app' <- specialBind | ||
case head args' of -- 'specialBind' ensures non-empty args | ||
(Binding _ _ _ (AstBindSchema sty)) -> | ||
case Data.List.uncons args' of -- 'specialBind' ensures non-empty args | ||
Just (Binding _ _ _ (AstBindSchema sty), _) -> | ||
setOrAssocYR yrResume sty | ||
a -> die'' a "Expected binding" | ||
Just (a,_) -> die'' a "Expected binding" | ||
Nothing -> error "Impossible case" | ||
return app' | ||
_ -> mkApp fun' args' | ||
|
||
|
@@ -1204,7 +1205,10 @@ showFails = do | |
|
||
-- | unsafe lens for using `typecheckBody` with const | ||
singLens :: Iso' a [a] | ||
singLens = iso pure head | ||
singLens = iso pure (\case | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd add |
||
x:_ -> x | ||
[] -> error "Expected nonempty list" | ||
) | ||
|
||
-- | Typecheck a top-level production. | ||
typecheck :: TopLevel Node -> TC (TopLevel Node) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious if this can be changed to avoid the preceding
null protoSteps
check, and returning an empty list in this branch instead oferror
ing out? That is, smth like