Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion src/Agda2Hs/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ compile genv tlm _ def =

case (p , theDef def) of
(NoPragma , _ ) -> return []
(ExistingClassPragma , _ ) -> return []
(ExistingPragma , _ ) -> return []
(ExistingClassPragma , Record{} ) -> return []
(UnboxPragma s , Record{} ) -> [] <$ checkUnboxPragma def
(TransparentPragma , Function{}) -> [] <$ checkTransparentPragma def
(InlinePragma , Function{}) -> [] <$ checkInlinePragma def
Expand Down
1 change: 1 addition & 0 deletions src/Agda2Hs/Compile/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ hasCompilePragma q = processPragma q <&> \case
InlinePragma{} -> True
DefaultPragma{} -> True
ClassPragma{} -> True
ExistingPragma{} -> True
ExistingClassPragma{} -> True
UnboxPragma{} -> True
TransparentPragma{} -> True
Expand Down
2 changes: 2 additions & 0 deletions src/Agda2Hs/Pragma.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ data ParsedPragma
| InlinePragma
| DefaultPragma [Hs.Deriving ()]
| ClassPragma [String]
| ExistingPragma
| ExistingClassPragma
| UnboxPragma Strictness
| TransparentPragma
Expand Down Expand Up @@ -89,6 +90,7 @@ processPragma qn = liftTCM (getUniqueCompilerPragma pragmaName qn) >>= \case
Just (CompilerPragma r s)
| "class" `isPrefixOf` s -> return $ ClassPragma (words $ drop 5 s)
| s == "inline" -> return InlinePragma
| s == "existing" -> return ExistingPragma
| s == "existing-class" -> return ExistingClassPragma
| s == "unboxed" -> return $ UnboxPragma Lazy
| s == "unboxed-strict" -> return $ UnboxPragma Strict
Expand Down
Loading