doc-src/IsarAdvanced/Codegen/Thy/examples/Codegen.hs
author wenzelm
Thu, 11 Oct 2007 16:05:53 +0200
changeset 24970 050afeec89a7
parent 24628 33137422d7fd
child 25056 743f3603ba8b
permissions -rw-r--r--
renamed Syntax.XXX_mode to Syntax.mode_XXX; moved ProofContext.pp to Syntax.pp;

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 a) where {
  nulla = Nothing;
};

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

}