Skip to content

Commit

Permalink
Re #6477: expose Agda.Utils.Unsafe to add its docu to the html rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Mar 11, 2024
1 parent a1764f6 commit 75c7b54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Agda.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ library
Agda.Utils.Tuple
Agda.Utils.TypeLevel
Agda.Utils.TypeLits
Agda.Utils.Unsafe
Agda.Utils.Update
Agda.Utils.VarSet
Agda.Utils.Warshall
Expand All @@ -832,6 +833,7 @@ library

other-modules:
Paths_Agda
-- Need not export submodules if parent module reexports them.
Agda.Interaction.Highlighting.Dot.Backend
Agda.Interaction.Highlighting.Dot.Base
Agda.Interaction.Highlighting.HTML.Backend
Expand All @@ -842,7 +844,6 @@ library
Agda.Interaction.Options.HasOptions
Agda.Utils.CallStack.Base
Agda.Utils.CallStack.Pretty
Agda.Utils.Unsafe

-- Agda binary
---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/full/Agda/Utils/Unsafe.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import GHC.Exts (reallyUnsafePtrEquality#, isTrue#)

-- | Checks if two arguments are equal as pointers in memory.
-- Please note, that this function is a hack, and it can worsen the behavior of compiler.
-- See https://gitlab.haskell.org/ghc/ghc/-/blob/d151546e59a50158f25c3df6728b00d3c27bb4b9/compiler/GHC/Builtin/primops.txt.pp#L3455
-- See <https://gitlab.haskell.org/ghc/ghc/-/blob/d151546e59a50158f25c3df6728b00d3c27bb4b9/compiler/GHC/Builtin/primops.txt.pp#L3455>.
unsafeComparePointers :: a -> a -> Bool
unsafeComparePointers x y = x `seq` y `seq` isTrue# (reallyUnsafePtrEquality# x y)

0 comments on commit 75c7b54

Please sign in to comment.