Commit dedc6d52 authored by Michael Hanus's avatar Michael Hanus
Browse files

Imports updated

parents 6a90bf89 4fd44fc1
Pipeline #340 canceled with stages
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
"synopsis": "A library to use Constraint Handling Rules in Curry programs", "synopsis": "A library to use Constraint Handling Rules in Curry programs",
"category": [ "Constraints" ], "category": [ "Constraints" ],
"dependencies": { "dependencies": {
"flatcurry": ">= 2.0.0", "flatcurry" : ">= 2.0.0",
"prolog" : ">= 1.0.0", "prolog" : ">= 1.0.0",
"wl-pprint": ">= 0.0.1", "redblacktree" : ">= 0.0.1",
"xml" : ">= 2.0.0" "wl-pprint" : ">= 0.0.1",
"xml" : ">= 2.0.0"
}, },
"exportedModules": [ "CHR" ], "exportedModules": [ "CHR" ],
"description": "This library an implementation of Constraints Handling "description": "This library an implementation of Constraints Handling
......
...@@ -32,13 +32,13 @@ import FlatCurry.Files ...@@ -32,13 +32,13 @@ import FlatCurry.Files
import FlatCurry.Goodies import FlatCurry.Goodies
import FlatCurry.Pretty ( defaultOptions, ppTypeExp ) import FlatCurry.Pretty ( defaultOptions, ppTypeExp )
import List import List
import SetRBT
import Unsafe -- for tracing import Unsafe -- for tracing
import XML import XML
import Text.Pretty ( showWidth ) import Data.Set.RBTree ( SetRBT, member, empty, insert )
import Prolog.Types import Prolog.Types
import Prolog.Show ( showPlClause, showPlGoals ) import Prolog.Show ( showPlClause, showPlGoals )
import Text.Pretty ( showWidth )
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- Operator definitions for writing CHRs: -- Operator definitions for writing CHRs:
...@@ -265,13 +265,13 @@ solveCHR prules goal = ...@@ -265,13 +265,13 @@ solveCHR prules goal =
type History = SetRBT ([Int],Int) -- entry: constraint indices and rule index type History = SetRBT ([Int],Int) -- entry: constraint indices and rule index
emptyHistory :: Ord a => SetRBT a emptyHistory :: Ord a => SetRBT a
emptyHistory = emptySetRBT (<=) emptyHistory = empty
extendHistory :: a -> SetRBT a -> SetRBT a extendHistory :: Ord a => a -> SetRBT a -> SetRBT a
extendHistory = insertRBT extendHistory = insert
inHistory :: a -> SetRBT a -> Bool inHistory :: Ord a => a -> SetRBT a -> Bool
inHistory = elemRBT inHistory = member
------------------------------------------------------------------------ ------------------------------------------------------------------------
--- Interpret CHR rules (parameterized over domain variables) --- Interpret CHR rules (parameterized over domain variables)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment