Module

Run.Unsafe

Package
purescript-game
Repository
artemisSystem/purescript-game

See Game.mkReducer for a use case of this module. In essence, it allows you to talk about open rows in Run or VariantF without them actually being open rows. This can help get around some issues with the type system. For this to work, the ("💣" ∷ UNSAFE) row must represent a row that can be of any length and contain any fields. Therefore, it is unsafe to interact with this field, which is why the bomb emoji is used. In other words, when this module is in play, using any pattern match function or similar on a VariantF, and matching on the "💣" field, is unsafe. It is up to you to handle everything, this module just defines the types you will need.

#Unsafe Source

data Unsafe a

Instances

#Anything Source

type Anything r = ("💣" :: UNSAFE | r)