diff options
| author | peter.ljunglof <peter.ljunglof@gu.se> | 2012-08-29 21:45:10 +0000 |
|---|---|---|
| committer | peter.ljunglof <peter.ljunglof@gu.se> | 2012-08-29 21:45:10 +0000 |
| commit | a7de16c34b7ccffc5ae0ac4fd004dfc155b4f546 (patch) | |
| tree | a39529476f339e06ba4b9283ef9073c9b5dcaf75 /src/compiler/GF/Speech | |
| parent | e2ecdfed1fea8dcc77ab3c8d83f74fc577908f5b (diff) | |
Added an O(n log n) version of nub
The new nub is called nub', and it replaces the old sortNub which was
not lazy and did not retain the order between the elements.
Diffstat (limited to 'src/compiler/GF/Speech')
| -rw-r--r-- | src/compiler/GF/Speech/RegExp.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/GF/Speech/RegExp.hs b/src/compiler/GF/Speech/RegExp.hs index 2592b3d57..bf9f89cb3 100644 --- a/src/compiler/GF/Speech/RegExp.hs +++ b/src/compiler/GF/Speech/RegExp.hs @@ -53,7 +53,7 @@ isEpsilon (REConcat []) = True isEpsilon _ = False unionRE :: Ord a => [RE a] -> RE a -unionRE = unionOrId . sortNub . concatMap toList +unionRE = unionOrId . nub' . concatMap toList where toList (REUnion xs) = xs toList x = [x] |
