From: Anders Mörtberg Date: Sun, 24 Sep 2017 07:44:51 +0000 (+0200) Subject: use foldrWithKey instead of foldWithKey to eliminate warnings X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=dc53deede2b72ba0d4b545156cddfcb78f1c088e;p=cubicaltt.git use foldrWithKey instead of foldWithKey to eliminate warnings --- diff --git a/Connections.hs b/Connections.hs index 8e15172..3a29a62 100644 --- a/Connections.hs +++ b/Connections.hs @@ -5,7 +5,7 @@ module Connections where import Control.Applicative import Data.List import Data.Map (Map,(!),keys,fromList,toList,mapKeys,elems,intersectionWith - ,unionWith,singleton,foldWithKey,assocs,mapWithKey + ,unionWith,singleton,foldrWithKey,assocs,mapWithKey ,filterWithKey,member) import Data.Set (Set,isProperSubsetOf) import qualified Data.Map as Map @@ -373,7 +373,7 @@ instance Nominal Formula where swap (psi1 :\/: psi2) (i,j) = swap psi1 (i,j) :\/: swap psi2 (i,j) face :: Nominal a => a -> Face -> a -face = foldWithKey (\i d a -> act a (i,Dir d)) +face = foldrWithKey (\i d a -> act a (i,Dir d)) -- the faces should be incomparable type System a = Map Face a