ML Datatype for storing Prolog Programs