-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1891 from GaloisInc/crux-mir-nightly-2023-01-23
`crux-mir-comp`: Support `nightly-2023-01-23`
- Loading branch information
Showing
78 changed files
with
285 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
module Mir.Compositional.DefId | ||
( hasInstPrefix | ||
) where | ||
|
||
import Data.List.Extra (unsnoc) | ||
import qualified Data.Text as Text | ||
import Data.Text (Text) | ||
|
||
import Mir.DefId | ||
|
||
-- | Check if @edid@ has the same path as @pfxInit@, plus a final path | ||
-- component that begins with the name @_inst@. | ||
hasInstPrefix :: [Text] -> ExplodedDefId -> Bool | ||
hasInstPrefix pfxInit edid = | ||
case unsnoc edid of | ||
Nothing -> False | ||
Just (edidInit, edidLast) -> | ||
pfxInit == edidInit && | ||
"_inst" `Text.isPrefixOf` edidLast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.