doc-src/IsarAdvanced/Codegen/Thy/examples/Codegen.hs
author urbanc
Fri, 14 Sep 2007 13:32:07 +0200
changeset 24572 7be5353ec4bd
parent 24421 acfb2413faa3
child 24628 33137422d7fd
permissions -rw-r--r--
reverted back to the old version of the equivariance lemma for ALL

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];

}