CMonad.hascasl.output revision 6f031207ab25d41ae4740a4151d5946faff4768b
class Functor < Type -> Type
class Monad < Functor
type List : Monad
vars a, b : Type
var m : Monad
op fail : m a
op return : a -> m a
var f : Functor
op fmap : (a -> b) -> f a -> f b
op empty : List a
type Set : Functor
op emptySet : Set a
. fail = emptySet
. fail = "";
op map : (a -> b) -> List a -> List b
op __bind__ : m a * (a -> m b) -> m b
var g : a -> b
var x : m a
. fmap g = map g
. fmap g x = x bind \ y : a .! return (g y);
classes
Functor < Type -> Type;
Monad < Type -> Type
class
Monad < Functor
types
List : Monad;
Set : Functor
vars
a : Type %(var_1)%;
b : Type %(var_2)%;
f : Functor %(var_4)%;
m : Monad %(var_3)%
op __bind__ : forall a : Type; b : Type; m : Monad
. m a * (a -> m b) -> m b
%(op)%
op empty : forall a : Type . List a %(op)%
op emptySet : forall a : Type . Set a %(op)%
op fail : forall a : Type; m : Monad . m a %(op)%
op fmap : forall a : Type; b : Type; f : Functor
. (a -> b) -> f a -> f b
%(op)%
op map : forall a : Type; b : Type . (a -> b) -> List a -> List b
%(op)%
op return : forall a : Type; m : Monad . a -> m a %(op)%
vars
g : a -> b;
x : m a
. fail = emptySet
. fail = ""
forall a : Type; b : Type; g : a -> b . fmap g = map g
forall a : Type; b : Type; m : Monad; g : a -> b; x : m a
. fmap g x = x bind \ y : a .! return (g y)
### Hint 7.5, is type variable 'a'
### Hint 7.8, is type variable 'b'
### Hint 9.5, is type variable 'm'
### Hint 15.5, is type variable 'f'
### Hint 25.8,
constrain 'Set : Monad' is unprovable
known kinds are: {Functor}
*** Error 25.8,
in term '(op fail : forall a : Type; m : Monad . m a)
= (op emptySet : forall a : Type . Set a)' of type 'Unit'
unresolved constraints
'{Set : Monad}'
*** Error 25.8,
in term '(op fail : forall a : Type; m : Monad . m a)
= (op emptySet : forall a : Type . Set a)'
are uninstantiated type variables
'[_v11_a]'
*** Error 27.8,
in term '(op fail : forall a : Type; m : Monad . m a)
= (op empty : forall a : Type . List a)'
are uninstantiated type variables
'[_v21_a]'
### Hint 33.7, not a class 'a'
### Hint 33.7, not a class 'b'
### Hint 33.23, not a kind 'm a'