haskell - What does [safe] marker mean in ghci? -


prelude data.void> :info void data void       -- defined in `data.void' instance [safe] eq void -- defined in `data.void' instance [safe] ord void -- defined in `data.void' instance [safe] read void -- defined in `data.void' instance [safe] show void -- defined in `data.void' 

what [safe] mean?

it means datatype defined in module defined using safe extension. can find details of extension in user guide.

in fact, can test defining module using safe extension:

{-#language safe#-}  data test = test deriving (eq, show) 

and trying out in ghci:

λ> :i test data test = test     instance [safe] eq test  instance [safe] show test  

but note in current ghc (7.10.2), safe extension cannot relied of trust guarantee because of this ghc bug.


Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -

javascript - How to change image src on success AJAX -