doc-src/IsarAdvanced/Codegen/Thy/examples/Codegen.hs
changeset 30242 aea5d7fa7ef5
parent 30241 3a1aef73b2b2
parent 30236 e70dae49dc57
child 30244 48543b307e99
child 30251 7aec011818e0
child 30257 06b2d7f9f64b
     1.1 --- a/doc-src/IsarAdvanced/Codegen/Thy/examples/Codegen.hs	Wed Mar 04 11:05:02 2009 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,23 +0,0 @@
     1.4 -module Codegen where {
     1.5 -
     1.6 -import qualified Nat;
     1.7 -
     1.8 -class Null a where {
     1.9 -  nulla :: a;
    1.10 -};
    1.11 -
    1.12 -heada :: forall a. (Codegen.Null a) => [a] -> a;
    1.13 -heada (x : xs) = x;
    1.14 -heada [] = Codegen.nulla;
    1.15 -
    1.16 -null_option :: forall a. Maybe a;
    1.17 -null_option = Nothing;
    1.18 -
    1.19 -instance Codegen.Null (Maybe a) where {
    1.20 -  nulla = Codegen.null_option;
    1.21 -};
    1.22 -
    1.23 -dummy :: Maybe Nat.Nat;
    1.24 -dummy = Codegen.heada [Just (Nat.Suc Nat.Zero_nat), Nothing];
    1.25 -
    1.26 -}