X-Git-Url: http://git.megacz.com/?p=coq-hetmet.git;a=blobdiff_plain;f=examples%2FDemo.hs;h=afedde6d253f0a13aca99814ddcea27aa38ea9ec;hp=4e7f599682ed224e8df3251a7727cb361261a404;hb=a3592b805c570883fd63a5c75d6e16ea83f2e849;hpb=856ef91d5132ac813631f01420a8291a92bce1ad diff --git a/examples/Demo.hs b/examples/Demo.hs index 4e7f599..afedde6 100644 --- a/examples/Demo.hs +++ b/examples/Demo.hs @@ -1,13 +1,23 @@ {-# OPTIONS_GHC -XModalTypes -fcoqpass -dcore-lint #-} module Demo (demo) where -demo con mer = <[ ~~mer ~~(con (2::Int)) ~~(con (12::Int)) ]> +--demo con mer = <[ ~~mer ~~(con (2::Int)) ~~(con (12::Int)) ]> -- demo const mult = <[ let q = ~~(const (1::Int)) in ~~mult q q ]> ---demo const mult = --- <[ let twelve = ~~(const (12::Int)) --- in ~~mult (~~mult twelve twelve) (~~mult twelve twelve) ]> +demo const mult = + <[ let twelve = ~~(const (12::Int)) + in let four = ~~(const (4::Int)) + in ~~mult four twelve ]> + +{- +demo const mult = + <[ let twelve = ~~(const (12::Int)) + in let twelvea = twelve + four = ~~(const (4::Int)) + twelveb = twelve + in ~~mult (~~mult twelvea four) (~~mult twelveb twelveb) ]> +-} {- demo const mult = demo' 3