Skip to content
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

CaseOfCase kind mismatch error fix #5923

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Changes from 1 commit
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
10 changes: 6 additions & 4 deletions plutus-core/plutus-ir/src/PlutusIR/Contexts.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ data SplitMatchContext tyname name uni fun a = SplitMatchContext
}

extractTyArgs :: AppContext tyname name uni fun a -> Maybe [Type tyname uni a]
extractTyArgs = go []
where go acc (TypeAppContext ty _ ctx) = go (ty:acc) ctx
go _ (TermAppContext{}) = Nothing
go acc AppContextEnd = Just acc
extractTyArgs = go id
Unisay marked this conversation as resolved.
Show resolved Hide resolved
where
go acc = \case
TypeAppContext ty _ ctx -> go (acc . (ty :)) ctx
TermAppContext{} -> Nothing
AppContextEnd -> Just (acc [])

-- | Split a normal datatype 'match'.
splitNormalDatatypeMatch
Expand Down