Skip to content

Commit

Permalink
Exclude names starting with Haskell. from check for COMPILE pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
jespercockx committed Nov 15, 2024
1 parent 4870d37 commit d597a20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Agda2Hs/Compile/Name.hs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ compileQName f
existsInHaskell <- orM
[ pure $ isJust special
, pure $ isPrimModule mod
, pure $ isHsModule mod
, hasCompilePragma f
, isClassFunction f
, isWhereFunction f
Expand Down
3 changes: 3 additions & 0 deletions src/Agda2Hs/Compile/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ primModules =
isPrimModule :: Hs.ModuleName () -> Bool
isPrimModule mod = any (`isPrefixOf` pp mod) primModules

isHsModule :: Hs.ModuleName () -> Bool
isHsModule mod = "Haskell." `isPrefixOf` pp mod

concatUnzip :: [([a], [b])] -> ([a], [b])
concatUnzip = (concat *** concat) . unzip

Expand Down

0 comments on commit d597a20

Please sign in to comment.