module test import StdEnv, StdGeneric import Data.Array Start :: [{!Int}] Start = [ appendArr {!1,2,3} {!4,5,6,7} , appendArr {!} {!} , appendArr {!} {!1,2,3} , appendArr {!1,2,3} {!} ] /* derive bimap Box :: Box b a =: Box b unBox (Box b) :== b box b :== Box b generic gPotentialInf a :: [String] -> Box Bool a gPotentialInf{|World|} _ = box False gPotentialInf{|File|} _ = box False gPotentialInf{|Bool|} _ = box False gPotentialInf{|Char|} _ = box False gPotentialInf{|Real|} _ = box False gPotentialInf{|Int|} _ = box False gPotentialInf{|Dynamic|} _ = box False gPotentialInf{|(->)|} _ _ _ = box False gPotentialInf{|{}|} a m = box (unBox (a m)) gPotentialInf{|{!}|} a m = box (unBox (a m)) gPotentialInf{|{#}|} a m = box (unBox (a m)) gPotentialInf{|UNIT|} _ = box False gPotentialInf{|EITHER|} l r m = box (unBox (l m) || unBox (r m)) gPotentialInf{|PAIR|} l r m = box (unBox (l m) || unBox (r m)) gPotentialInf{|CONS|} x m = box (unBox (x m)) gPotentialInf{|FIELD|} x m = box (unBox (x m)) gPotentialInf{|RECORD of {grd_name}|} x m | isMember grd_name m = box True = box (unBox (x [grd_name:m])) gPotentialInf{|OBJECT of {gtd_name}|} x m | isMember gtd_name m = box True = box (unBox (x [gtd_name:m])) //derive gPotentialInf Int,Bool,Char,Real,String,File,World,Dynamic derive gPotentialInf (),(,),(,,),(,,,),(,,,,),(,,,,,),(,,,,,,),(,,,,,,,),(,,,,,,,,),(,,,,,,,,,),(,,,,,,,,,,),(,,,,,,,,,,,),(,,,,,,,,,,,,),(,,,,,,,,,,,,,),(,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,),(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) derive gPotentialInf {},{#},{!},[],[! ],[ !],[!!],[#],[#!] Start :: Box Bool *File Start = gPotentialInf{|*|} [] */