unsafely- Flexible access control for unsafe operations and instances

Safe HaskellNone



Really unsafe module to provide internal interface. This module should be imported if you wish to allow the unsafe computation globally.

But be careful: the unsafety contaminates entire the program once you write the instance for ReallyUnsafe somewhere.



class ReallyUnsafely t Source

The trick type-class to prevent providing global instances for Unsafely. This class is not exported in Data.Constraint.Unsafely, so if you want to permit unsafe operations globally, you should import this module directly.

class ReallyUnsafely t => Unsafely t Source

The constraint for the instances which might be unsafe in some sence. t in Unsafely t is the dummy tag for some series of unsafe operations.

Minimal complete definition



unsafely :: forall proxy t a. proxy t -> (Unsafely t => a) -> a Source

Evaluate the value which might be unsafe.