doc-src/IsarAdvanced/Codegen/Thy/examples/Codegen.hs
changeset 22188 a63889770d57
parent 22015 12b94d7f7e1f
child 22751 1bfd75c1f232
equal deleted inserted replaced
22187:a2c4861363d5 22188:a63889770d57
     8 
     8 
     9 heada :: (Codegen.Null a) => [a] -> a;
     9 heada :: (Codegen.Null a) => [a] -> a;
    10 heada (y : xs) = y;
    10 heada (y : xs) = y;
    11 heada [] = Codegen.nulla;
    11 heada [] = Codegen.nulla;
    12 
    12 
    13 null_option :: Maybe b;
    13 null_option :: Maybe a;
    14 null_option = Nothing;
    14 null_option = Nothing;
    15 
    15 
    16 instance Codegen.Null (Maybe b) where {
    16 instance Codegen.Null (Maybe b) where {
    17   nulla = Codegen.null_option;
    17   nulla = Codegen.null_option;
    18 };
    18 };