cplug-0.2.0.0: Recompile and run partially applied C functions in Haskell, during runtime

Safe HaskellSafe
LanguageHaskell2010

Data.Fixable

Synopsis

Documentation

data Fix a Source

This is a analogue to Maybe, but without all of the predefined instances, to prevent errors.

Constructors

Unfixed 
Fixed a 

Instances

Eq a => Eq (Fix a) Source 
Ord a => Ord (Fix a) Source 
Show a => Show (Fix a) Source 
FixResolvable a r => FixResolvable (Fix t -> a) r Source 
FixCompilable a r b s => FixCompilable (Fix t -> a) r (Fix t -> b) s Source 

isFixed :: Fix a -> Bool Source

Illustrative examples:

>>> isFixed (Fixed "something")
True
>>> isFixed Unfixed
False

fromFixed :: Fix a -> a Source

fromFixed throws an error on Unfixed