Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Constrained.FunctionSymbol
Synopsis
- sameFunSym ∷ ∀ (t1 ∷ [Type] → Type → Type) d1 r1 (t2 ∷ [Type] → Type → Type) d2 r2. (Typeable t1, Typeable d1, Typeable r1, Typeable t2, Typeable d2, Typeable r2, Eq (t1 d1 r1)) ⇒ t1 d1 r1 → t2 d2 r2 → Maybe (t1 :~: t2, d1 :~: d2, r1 :~: r2)
- getWitness ∷ ∀ t t' d r. (Typeable t, Typeable d, Typeable r, Typeable t') ⇒ t d r → Maybe (t' d r)
- class Semantics (t ∷ [Type] → Type → Type) where
Documentation
sameFunSym ∷ ∀ (t1 ∷ [Type] → Type → Type) d1 r1 (t2 ∷ [Type] → Type → Type) d2 r2. (Typeable t1, Typeable d1, Typeable r1, Typeable t2, Typeable d2, Typeable r2, Eq (t1 d1 r1)) ⇒ t1 d1 r1 → t2 d2 r2 → Maybe (t1 :~: t2, d1 :~: d2, r1 :~: r2) Source #
getWitness ∷ ∀ t t' d r. (Typeable t, Typeable d, Typeable r, Typeable t') ⇒ t d r → Maybe (t' d r) Source #
Here we only care about the Type t
, the dom, and the rng can be
anything. Useful for defining patterns.
class Semantics (t ∷ [Type] → Type → Type) where Source #
Semantic operations are ones that give the function symbol, meaning as a function. I.e. how to apply the function to a list of arguments and return a value.