Changes between Version 4 and Version 5 of Language/Overview/ClassSystem
- Timestamp:
- 08/26/10 02:07:50 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Language/Overview/ClassSystem
v4 v5 27 27 28 28 == Region classes == 29 In Haskell we use type classes on type variables to restrict how these variables can be instantiated. 29 In Haskell we use type classes on type variables to restrict how these variables can be instantiated. For example, we can write: 30 30 {{{ 31 31 (==) :: forall a. Eq a => a -> a -> Bool 32 32 }}} 33 33 34 The `Eq a` context restricts `forall a` to just the types that support equality.34 Here, the `Eq a` context restricts `forall a` to just the types that support equality. 35 35 36 36 In Disciple, we can do a similar thing with regions:
