Skip to content
Browse files

Retract (load ?filename) and (require ?filename) facts

immediately after they are handled.

This allows us to send them over again
  • Loading branch information...
1 parent 5ef4042 commit 402e936977bcff85b6c4c98e07e1fd9d71aecfd0 @yrashk committed
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/main.clp
View
10 src/main.clp
@@ -1,9 +1,11 @@
(defmodule Hypnotoad)
-(defrule load-constructs (require ?filename)
+(defrule load-constructs ?fact <- (require ?filename)
=>
- (load (remote-retrieve-file ?filename)))
+ (load (remote-retrieve-file ?filename))
+ (retract ?fact))
-(defrule load-facts (include ?filename)
+(defrule load-facts ?fact <- (include ?filename)
=>
- (load-facts (remote-retrieve-file ?filename)))
+ (load-facts (remote-retrieve-file ?filename))
+ (retract ?fact))

0 comments on commit 402e936

Please sign in to comment.
Something went wrong with that request. Please try again.