author | urbanc |
Fri, 17 Nov 2006 17:32:30 +0100 | |
changeset 21405 | 26b51f724fe6 |
parent 21189 | 5435ccdb4ea1 |
child 21993 | 4b802a9e0738 |
permissions | -rw-r--r-- |
21147 | 1 |
module Codegen where |
21189 | 2 |
import qualified Nat |
21147 | 3 |
|
4 |
class Null a where |
|
5 |
null :: a |
|
6 |
||
7 |
head :: (Codegen.Null a_1) => [a_1] -> a_1 |
|
8 |
head (y : xs) = y |
|
9 |
head [] = Codegen.null |
|
10 |
||
11 |
null_option :: Maybe b |
|
12 |
null_option = Nothing |
|
13 |
||
14 |
instance Codegen.Null (Maybe b) where |
|
15 |
null = Codegen.null_option |
|
16 |
||
21189 | 17 |
dummy :: Maybe Nat.Nat |
18 |
dummy = Codegen.head [Just (Nat.Suc Nat.Zero_nat), Nothing] |