doc-src/IsarAdvanced/Codegen/Thy/examples/Codegen.hs
author wenzelm
Tue, 28 Aug 2007 19:45:45 +0200
changeset 24464 58d24cbe5fa6
parent 24421 acfb2413faa3
child 24628 33137422d7fd
permissions -rw-r--r--
TheoremHook: fixed copy-paste mistake;

module Codegen where {

import qualified Nat;

class Null a where {
  nulla :: a;
};

heada :: (Codegen.Null b) => [b] -> b;
heada (x : xs) = x;
heada [] = Codegen.nulla;

instance Codegen.Null (Maybe b) where {
  nulla = Nothing;
};

dummy :: Maybe Nat.Nat;
dummy = Codegen.heada [Just (Nat.Suc Nat.Zero_nat), Nothing];

}