aarch64 haskell: prefer "maybe" over "case"

More clear and concise.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This commit is contained in:
Gerwin Klein 2022-03-24 08:43:35 +11:00 committed by Gerwin Klein
parent 7d4b58f618
commit ab76f0a250
1 changed files with 1 additions and 3 deletions

View File

@ -288,9 +288,7 @@ deleteASID asid pt = do
Just poolPtr -> do
ASIDPool pool <- getObject poolPtr
let maybeEntry = pool!(asid .&. mask asidLowBits)
let maybeRoot = case maybeEntry of -- FIXME AARCH64: surely there is option.map
Just (ASIDPoolVSpace vmID p) -> Just p
Nothing -> Nothing
let maybeRoot = maybe Nothing (Just . apVSpace) maybeEntry
when (maybeRoot == Just pt) $ do
invalidateTLBByASID asid
invalidateASIDEntry asid