comparison lib/ur/basis.urs @ 711:7292bcb7c02d

Made type class system very general; demo compiles
author Adam Chlipala <adamc@hcoop.net>
date Thu, 09 Apr 2009 12:31:56 -0400
parents 0406e9cccb72
children 915ec60592d4
comparison
equal deleted inserted replaced
710:71409a4ccb67 711:7292bcb7c02d
69 val read_time : read time 69 val read_time : read time
70 70
71 71
72 (** * Monads *) 72 (** * Monads *)
73 73
74 class monad :: Type -> Type 74 class monad :: (Type -> Type) -> Type
75 val return : m ::: (Type -> Type) -> t ::: Type 75 val return : m ::: (Type -> Type) -> t ::: Type
76 -> monad m 76 -> monad m
77 -> t -> m t 77 -> t -> m t
78 val bind : m ::: (Type -> Type) -> t1 ::: Type -> t2 ::: Type 78 val bind : m ::: (Type -> Type) -> t1 ::: Type -> t2 ::: Type
79 -> monad m 79 -> monad m