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

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -