diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c914d..c8edc9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.0.1.4 + +- Added support for GHC 9.10. + # 0.0.1.3 - Updated version bounds for dependencies. diff --git a/Data-MonoidMap.html b/Data-MonoidMap.html index ef87769..43d9bff 100644 --- a/Data-MonoidMap.html +++ b/Data-MonoidMap.html @@ -1,43 +1,43 @@ -Data.MonoidMap
monoidmap-0.0.1.3: Monoidal map type
Copyright© 2022–2024 Jonathan Knowles
LicenseApache-2.0
Safe HaskellNone
LanguageHaskell2010

Data.MonoidMap

Description

 
Synopsis

Introduction

This module provides the MonoidMap type, which:

This function satisfies the following property:

get k (overlap m1 m2) == overlap (get k m1) (get k m2)
 

This function provides the definition of overlap for the MonoidMap - instance of OverlappingGCDMonoid.

Examples

Expand

With String values:

>>> m1 = fromList [(1,"abc"   ), (2,"abcd"  ), (3,"abcde "), (4,"abcdef")]
+ instance of OverlappingGCDMonoid.

Examples

Expand

With String values:

>>> m1 = fromList [(1,"abc"   ), (2,"abcd"  ), (3,"abcde "), (4,"abcdef")]
 >>> m2 = fromList [(1,   "def"), (2,  "cdef"), (3," bcdef"), (4,"abcdef")]
 >>> m3 = fromList [(1,   ""   ), (2,  "cd"  ), (3," bcde" ), (4,"abcdef")]
-
>>> overlap m1 m2 == m3
-True
-

With Sum Natural values:

>>> m1 = fromList [("a", 0), ("b", 1), ("c", 2), ("d", 3), ("e", 4)]
+
>>> overlap m1 m2 == m3
+True
+

With Sum Natural values:

>>> m1 = fromList [("a", 0), ("b", 1), ("c", 2), ("d", 3), ("e", 4)]
 >>> m2 = fromList [("a", 4), ("b", 3), ("c", 2), ("d", 1), ("e", 0)]
 >>> m3 = fromList [("a", 0), ("b", 1), ("c", 2), ("d", 1), ("e", 0)]
-
>>> overlap m1 m2 == m3
-True
-

stripPrefixOverlap :: (Ord k, MonoidNull v, OverlappingGCDMonoid v) => MonoidMap k v -> MonoidMap k v -> MonoidMap k v #

Strips from the second map its greatest prefix overlap with suffixes +

>>> overlap m1 m2 == m3
+True
+

stripPrefixOverlap :: (Ord k, MonoidNull v, OverlappingGCDMonoid v) => MonoidMap k v -> MonoidMap k v -> MonoidMap k v #

Strips from the second map its greatest prefix overlap with suffixes of the first map.

Evaluating stripPrefixOverlap m1 m2 produces the remainder - r2:

m1 == r1 <> o   
-m2 ==       o <> r2
+ r2:

m1 == r1 <> o   
+m2 ==       o <> r2
 

Where o is the greatest overlap of maps m1 and m2: the unique greatest map that is both a suffix of m1 and a prefix of m2.

This function satisfies the following property:

get k (stripPrefixOverlap m1 m2)
-    == stripPrefixOverlap (get k m1) (get k m2)
+    == stripPrefixOverlap (get k m1) (get k m2)
 

This function provides the definition of stripPrefixOverlap for the - MonoidMap instance of OverlappingGCDMonoid.

Examples

Expand

With String values:

>>> m1 = fromList [(1,"abc"   ), (2,"abcd"  ), (3,"abcde" ), (4,"abcdef")]
+ MonoidMap instance of OverlappingGCDMonoid.

Examples

Expand

With String values:

>>> m1 = fromList [(1,"abc"   ), (2,"abcd"  ), (3,"abcde" ), (4,"abcdef")]
 >>> m2 = fromList [(1,   "def"), (2,  "cdef"), (3, "bcdef"), (4,"abcdef")]
 >>> m3 = fromList [(1,   "def"), (2,    "ef"), (3,     "f"), (4,      "")]
-
>>> stripPrefixOverlap m1 m2 == m3
-True
-

With Sum Natural values:

>>> m1 = fromList [("a", 0), ("b", 1), ("c", 2), ("d", 3), ("e", 4)]
+
>>> stripPrefixOverlap m1 m2 == m3
+True
+

With Sum Natural values:

>>> m1 = fromList [("a", 0), ("b", 1), ("c", 2), ("d", 3), ("e", 4)]
 >>> m2 = fromList [("a", 4), ("b", 3), ("c", 2), ("d", 1), ("e", 0)]
 >>> m3 = fromList [("a", 4), ("b", 2), ("c", 0), ("d", 0), ("e", 0)]
-
>>> stripPrefixOverlap m1 m2 == m3
-True
-

stripSuffixOverlap :: (Ord k, MonoidNull v, OverlappingGCDMonoid v) => MonoidMap k v -> MonoidMap k v -> MonoidMap k v #

Strips from the second map its greatest suffix overlap with prefixes +

>>> stripPrefixOverlap m1 m2 == m3
+True
+

stripSuffixOverlap :: (Ord k, MonoidNull v, OverlappingGCDMonoid v) => MonoidMap k v -> MonoidMap k v -> MonoidMap k v #

Strips from the second map its greatest suffix overlap with prefixes of the first map.

Evaluating stripSuffixOverlap m2 m1 produces the remainder - r1:

m1 == r1 <> o   
-m2 ==       o <> r2
+ r1:

m1 == r1 <> o   
+m2 ==       o <> r2
 

Where o is the greatest overlap of maps m1 and m2: the unique greatest map that is both a suffix of m1 and a prefix of m2.

This function satisfies the following property:

get k (stripSuffixOverlap m2 m1)
-    == stripSuffixOverlap (get k m2) (get k m1)
+    == stripSuffixOverlap (get k m2) (get k m1)
 

This function provides the definition of stripSuffixOverlap for the - MonoidMap instance of OverlappingGCDMonoid.

Examples

Expand

With String values:

>>> m1 = fromList [(1,"abc"   ), (2,"abcd"  ), (3,"abcde" ), (4,"abcdef")]
+ MonoidMap instance of OverlappingGCDMonoid.

Examples

Expand

With String values:

>>> m1 = fromList [(1,"abc"   ), (2,"abcd"  ), (3,"abcde" ), (4,"abcdef")]
 >>> m2 = fromList [(1,   "def"), (2,  "cdef"), (3, "bcdef"), (4,"abcdef")]
 >>> m3 = fromList [(1,"abc"   ), (2,"ab"    ), (3,"a"     ), (4,""      )]
-
>>> stripSuffixOverlap m2 m1 == m3
-True
-

With Sum Natural values:

>>> m1 = fromList [("a", 0), ("b", 1), ("c", 2), ("d", 3), ("e", 4)]
+
>>> stripSuffixOverlap m2 m1 == m3
+True
+

With Sum Natural values:

>>> m1 = fromList [("a", 0), ("b", 1), ("c", 2), ("d", 3), ("e", 4)]
 >>> m2 = fromList [("a", 4), ("b", 3), ("c", 2), ("d", 1), ("e", 0)]
 >>> m3 = fromList [("a", 0), ("b", 0), ("c", 0), ("d", 2), ("e", 4)]
-
>>> stripSuffixOverlap m2 m1 == m3
-True
-

stripOverlap :: (Ord k, MonoidNull v, OverlappingGCDMonoid v) => MonoidMap k v -> MonoidMap k v -> (MonoidMap k v, MonoidMap k v, MonoidMap k v) #

Finds the greatest overlap of two maps and strips it from both maps.

Evaluating stripOverlap m1 m2 produces the tuple - (r1, o, r2), where:

m1 == r1 <> o   
-m2 ==       o <> r2
+
>>> stripSuffixOverlap m2 m1 == m3
+True
+

stripOverlap :: (Ord k, MonoidNull v, OverlappingGCDMonoid v) => MonoidMap k v -> MonoidMap k v -> (MonoidMap k v, MonoidMap k v, MonoidMap k v) #

Finds the greatest overlap of two maps and strips it from both maps.

Evaluating stripOverlap m1 m2 produces the tuple + (r1, o, r2), where:

m1 == r1 <> o   
+m2 ==       o <> r2
 

Where:

  • o is the greatest overlap of maps m1 and m2: the unique greatest map that is both a suffix of m1 and a prefix of m2.

    (see overlap)

  • r1 is the remainder obtained by stripping suffix overlap o from m1.

    (see stripSuffixOverlap)

  • r2 is the remainder obtained by stripping prefix overlap - o from m2.

    (see stripPrefixOverlap)

This function satisfies the following property:

stripOverlap m1 m2 ==
+    o from m2.

(see stripPrefixOverlap)

This function satisfies the following property:

stripOverlap m1 m2 ==
    ( stripSuffixOverlap m2 m1
    , overlap m1 m2
    , stripPrefixOverlap m1 m2
    )
 

This function provides the definition of stripOverlap for the - MonoidMap instance of OverlappingGCDMonoid.

\ No newline at end of file + MonoidMap instance of OverlappingGCDMonoid.

\ No newline at end of file diff --git a/doc-index.html b/doc-index.html index 3812623..c71d893 100644 --- a/doc-index.html +++ b/doc-index.html @@ -1 +1 @@ -monoidmap-0.0.1.3: Monoidal map type (Index)
monoidmap-0.0.1.3: Monoidal map type

Index

adjustData.MonoidMap
appendData.MonoidMap
commonPrefixData.MonoidMap
commonSuffixData.MonoidMap
disjointData.MonoidMap
disjointByData.MonoidMap
dropData.MonoidMap
emptyData.MonoidMap
filterData.MonoidMap
filterKeysData.MonoidMap
filterWithKeyData.MonoidMap
fromListData.MonoidMap
fromListWithData.MonoidMap
fromMapData.MonoidMap
getData.MonoidMap
intersectionData.MonoidMap
intersectionWithData.MonoidMap
intersectionWithAData.MonoidMap
invertData.MonoidMap
isPrefixOfData.MonoidMap
isSubmapOfData.MonoidMap
isSubmapOfByData.MonoidMap
isSuffixOfData.MonoidMap
mapData.MonoidMap
mapKeysData.MonoidMap
mapKeysWithData.MonoidMap
minusData.MonoidMap
minusMaybeData.MonoidMap
MonoidMapData.MonoidMap
monusData.MonoidMap
nonNullData.MonoidMap
nonNullCountData.MonoidMap
nonNullKeyData.MonoidMap
nonNullKeysData.MonoidMap
nullData.MonoidMap
nullifyData.MonoidMap
nullKeyData.MonoidMap
overlapData.MonoidMap
partitionData.MonoidMap
partitionKeysData.MonoidMap
partitionWithKeyData.MonoidMap
powerData.MonoidMap
setData.MonoidMap
singletonData.MonoidMap
splitAtData.MonoidMap
stripCommonPrefixData.MonoidMap
stripCommonSuffixData.MonoidMap
stripOverlapData.MonoidMap
stripPrefixData.MonoidMap
stripPrefixOverlapData.MonoidMap
stripSuffixData.MonoidMap
stripSuffixOverlapData.MonoidMap
takeData.MonoidMap
toListData.MonoidMap
toMapData.MonoidMap
unionData.MonoidMap
unionWithData.MonoidMap
unionWithAData.MonoidMap
\ No newline at end of file +monoidmap-0.0.1.4: Monoidal map type (Index)
monoidmap-0.0.1.4: Monoidal map type

Index

adjustData.MonoidMap
appendData.MonoidMap
commonPrefixData.MonoidMap
commonSuffixData.MonoidMap
disjointData.MonoidMap
disjointByData.MonoidMap
dropData.MonoidMap
emptyData.MonoidMap
filterData.MonoidMap
filterKeysData.MonoidMap
filterWithKeyData.MonoidMap
fromListData.MonoidMap
fromListWithData.MonoidMap
fromMapData.MonoidMap
getData.MonoidMap
intersectionData.MonoidMap
intersectionWithData.MonoidMap
intersectionWithAData.MonoidMap
invertData.MonoidMap
isPrefixOfData.MonoidMap
isSubmapOfData.MonoidMap
isSubmapOfByData.MonoidMap
isSuffixOfData.MonoidMap
mapData.MonoidMap
mapKeysData.MonoidMap
mapKeysWithData.MonoidMap
minusData.MonoidMap
minusMaybeData.MonoidMap
MonoidMapData.MonoidMap
monusData.MonoidMap
nonNullData.MonoidMap
nonNullCountData.MonoidMap
nonNullKeyData.MonoidMap
nonNullKeysData.MonoidMap
nullData.MonoidMap
nullifyData.MonoidMap
nullKeyData.MonoidMap
overlapData.MonoidMap
partitionData.MonoidMap
partitionKeysData.MonoidMap
partitionWithKeyData.MonoidMap
powerData.MonoidMap
setData.MonoidMap
singletonData.MonoidMap
splitAtData.MonoidMap
stripCommonPrefixData.MonoidMap
stripCommonSuffixData.MonoidMap
stripOverlapData.MonoidMap
stripPrefixData.MonoidMap
stripPrefixOverlapData.MonoidMap
stripSuffixData.MonoidMap
stripSuffixOverlapData.MonoidMap
takeData.MonoidMap
toListData.MonoidMap
toMapData.MonoidMap
unionData.MonoidMap
unionWithData.MonoidMap
unionWithAData.MonoidMap
\ No newline at end of file diff --git a/haddock-bundle.min.js b/haddock-bundle.min.js index 4b2fa13..23de169 100755 --- a/haddock-bundle.min.js +++ b/haddock-bundle.min.js @@ -1,2 +1,2 @@ -!function i(s,a,l){function c(t,e){if(!a[t]){if(!s[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var r=a[t]={exports:{}};s[t][0].call(r.exports,function(e){return c(s[t][1][e]||e)},r,r.exports,i,s,a,l)}return a[t].exports}for(var u="function"==typeof require&&require,e=0;e element with id '"+e+"'");return t}function x(){return u.defaultInstanceState==i.Open}function w(e){for(var t=S(e.target.id),n=t.element.open,o=0,r=t.toggles;owindow.innerHeight?this.searchResults.scrollTop+=e.bottom-window.innerHeight+80:e.topn)return u(e,this.pattern,o);var r=this.options,i=r.location,s=r.distance,a=r.threshold,l=r.findAllMatches,c=r.minMatchCharLength;return d(e,this.pattern,this.patternAlphabet,{location:i,distance:s,threshold:a,findAllMatches:l,minMatchCharLength:c})}}]),y}();e.exports=r},function(e,t,n){"use strict";var u=n(0);e.exports=function(e,t){return function e(t,n,o){if(n){var r=n.indexOf("."),i=n,s=null;-1!==r&&(i=n.slice(0,r),s=n.slice(r+1));var a=t[i];if(null!=a)if(s||"string"!=typeof a&&"number"!=typeof a)if(u(a))for(var l=0,c=a.length;l 0 and <= 1");p=p.name}else a[p]={weight:1};this._analyze({key:p,value:this.options.getFn(u,p),record:u,index:l},{resultMap:o,results:r,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:r}}},{key:"_analyze",value:function(e,t){var n=e.key,o=e.arrayIndex,r=void 0===o?-1:o,i=e.value,s=e.record,a=e.index,l=t.tokenSearchers,c=void 0===l?[]:l,u=t.fullSearcher,d=void 0===u?[]:u,h=t.resultMap,p=void 0===h?{}:h,f=t.results,v=void 0===f?[]:f;if(null!=i){var g=!1,m=-1,y=0;if("string"==typeof i){this._log("\nKey: "+(""===n?"-":n));var _=d.search(i);if(this._log('Full text: "'+i+'", score: '+_.score),this.options.tokenize){for(var b=i.split(this.options.tokenSeparator),k=[],S=0;S=c.length;if(this._log("\nCheck Matches: "+T),(g||_.isMatch)&&T){var N=p[a];N?N.output.push({key:n,arrayIndex:r,value:i,score:A,matchedIndices:_.matchedIndices}):(p[a]={item:s,output:[{key:n,arrayIndex:r,value:i,score:A,matchedIndices:_.matchedIndices}]},v.push(p[a]))}}else if(V(i))for(var P=0,j=i.length;P element with id '"+e+"'");return t}function x(){return u.defaultInstanceState==i.Open}function w(e){for(var t=S(e.target.id),n=t.element.open,o=0,r=t.toggles;owindow.innerHeight?this.searchResults.scrollTop+=e.bottom-window.innerHeight+80:e.topn)return u(e,this.pattern,o);var r=this.options,i=r.location,s=r.distance,a=r.threshold,l=r.findAllMatches,c=r.minMatchCharLength;return d(e,this.pattern,this.patternAlphabet,{location:i,distance:s,threshold:a,findAllMatches:l,minMatchCharLength:c})}}]),y}();e.exports=r},function(e,t,n){"use strict";var u=n(0);e.exports=function(e,t){return function e(t,n,o){if(n){var r=n.indexOf("."),i=n,s=null;-1!==r&&(i=n.slice(0,r),s=n.slice(r+1));var a=t[i];if(null!=a)if(s||"string"!=typeof a&&"number"!=typeof a)if(u(a))for(var l=0,c=a.length;l 0 and <= 1");p=p.name}else a[p]={weight:1};this._analyze({key:p,value:this.options.getFn(u,p),record:u,index:l},{resultMap:o,results:r,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:r}}},{key:"_analyze",value:function(e,t){var n=e.key,o=e.arrayIndex,r=void 0===o?-1:o,i=e.value,s=e.record,a=e.index,l=t.tokenSearchers,c=void 0===l?[]:l,u=t.fullSearcher,d=void 0===u?[]:u,h=t.resultMap,p=void 0===h?{}:h,f=t.results,v=void 0===f?[]:f;if(null!=i){var g=!1,m=-1,y=0;if("string"==typeof i){this._log("\nKey: "+(""===n?"-":n));var _=d.search(i);if(this._log('Full text: "'+i+'", score: '+_.score),this.options.tokenize){for(var b=i.split(this.options.tokenSeparator),k=[],S=0;S=c.length;if(this._log("\nCheck Matches: "+T),(g||_.isMatch)&&T){var N=p[a];N?N.output.push({key:n,arrayIndex:r,value:i,score:A,matchedIndices:_.matchedIndices}):(p[a]={item:s,output:[{key:n,arrayIndex:r,value:i,score:A,matchedIndices:_.matchedIndices}]},v.push(p[a]))}}else if(V(i))for(var P=0,j=i.length;Pmonoidmap-0.0.1.3: Monoidal map type
monoidmap-0.0.1.3: Monoidal map type

monoidmap-0.0.1.3: Monoidal map type

Monoidal map type with support for semigroup and monoid subclasses.

Modules

monoidmap-0.0.1.3

\ No newline at end of file +monoidmap-0.0.1.4: Monoidal map type
monoidmap-0.0.1.4: Monoidal map type

monoidmap-0.0.1.4: Monoidal map type

Monoidal map type with support for semigroup and monoid subclasses.

Modules

monoidmap-0.0.1.4

\ No newline at end of file diff --git a/meta.json b/meta.json index d8a1223..9b9eaf5 100644 --- a/meta.json +++ b/meta.json @@ -1 +1 @@ -{"haddock_version":"2.30.0"} \ No newline at end of file +{"haddock_version":"2.28.0"} \ No newline at end of file diff --git a/monoidmap.haddock b/monoidmap.haddock index fff2ae0..4edadfe 100644 Binary files a/monoidmap.haddock and b/monoidmap.haddock differ diff --git a/src/Data.MonoidMap.html b/src/Data.MonoidMap.html index 925bd53..2c0dd56 100644 --- a/src/Data.MonoidMap.html +++ b/src/Data.MonoidMap.html @@ -4,7 +4,7 @@ -- Copyright: © 2022–2024 Jonathan Knowles -- License: Apache-2.0 -- -module Data.MonoidMap +module Data.MonoidMap ( -- * Introduction -- $_introduction