Skip to content

Commit

Permalink
fix strictness checker
Browse files Browse the repository at this point in the history
include Word8, Word16, etc. and Int8, Int 16, etc.
  • Loading branch information
pa-ba committed Oct 3, 2024
1 parent 931f62d commit c003804
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/AsyncRattus/Plugin/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,11 @@ getModuleFS = moduleNameFS . moduleName
isRattModule :: FastString -> Bool
isRattModule = (`Set.member` rattModules)

ghcModules :: Set FastString
ghcModules = Set.fromList ["GHC.Types","GHC.Word","GHC.Int"]

isGhcModule :: FastString -> Bool
isGhcModule = (== "GHC.Types")
isGhcModule = (`Set.member` ghcModules)

getNameModule :: NamedThing a => a -> Maybe (FastString, FastString)
getNameModule v = do
Expand All @@ -187,7 +190,7 @@ getNameModule v = do

-- | The set of stable built-in types.
ghcStableTypes :: Set FastString
ghcStableTypes = Set.fromList ["Word","Int","Bool","Float","Double","Char", "IO"]
ghcStableTypes = Set.fromList ["Word", "Word8", "Word16","Word32", "Word64","Int","Int8","Int16","Int32","Int64","Bool","Float","Double","Char", "IO"]

isGhcStableType :: FastString -> Bool
isGhcStableType = (`Set.member` ghcStableTypes)
Expand Down

0 comments on commit c003804

Please sign in to comment.