doc-src/IsarAdvanced/Codegen/Thy/examples/Codegen.hs
author haftmann
Thu, 04 Jan 2007 17:11:09 +0100
changeset 21993 4b802a9e0738
parent 21189 5435ccdb4ea1
child 21994 dfa5133dbe73
permissions -rw-r--r--
updated manual

module Codegen where
import qualified Nat

class Null a where
  nulla :: a

heada :: (Codegen.Null a) => ([a] -> a)
heada (y : xs) = y

null_option :: Maybe b
null_option = Nothing

instance Codegen.Null (Maybe b) where
  null = Codegen.null_option

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