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 @@
"synopsis": "A library to use Constraint Handling Rules in Curry programs",
"category": [ "Constraints" ],
"dependencies": {
"flatcurry": ">= 2.0.0",
"prolog" : ">= 1.0.0",
"wl-pprint": ">= 0.0.1",
"xml" : ">= 2.0.0"
"flatcurry" : ">= 2.0.0",
"prolog" : ">= 1.0.0",
"redblacktree" : ">= 0.0.1",
"wl-pprint" : ">= 0.0.1",
"xml" : ">= 2.0.0"
},
"exportedModules": [ "CHR" ],
"description": "This library an implementation of Constraints Handling
......
......@@ -32,13 +32,13 @@ import FlatCurry.Files
import FlatCurry.Goodies
import FlatCurry.Pretty ( defaultOptions, ppTypeExp )
import List
import SetRBT
import Unsafe -- for tracing
import XML
import Text.Pretty ( showWidth )
import Data.Set.RBTree ( SetRBT, member, empty, insert )
import Prolog.Types
import Prolog.Show ( showPlClause, showPlGoals )
import Text.Pretty ( showWidth )
-------------------------------------------------------------------------------
-- Operator definitions for writing CHRs:
......@@ -265,13 +265,13 @@ solveCHR prules goal =
type History = SetRBT ([Int],Int) -- entry: constraint indices and rule index
emptyHistory :: Ord a => SetRBT a
emptyHistory = emptySetRBT (<=)
emptyHistory = empty
extendHistory :: a -> SetRBT a -> SetRBT a
extendHistory = insertRBT
extendHistory :: Ord a => a -> SetRBT a -> SetRBT a
extendHistory = insert
inHistory :: a -> SetRBT a -> Bool
inHistory = elemRBT
inHistory :: Ord a => a -> SetRBT a -> Bool
inHistory = member
------------------------------------------------------------------------
--- 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