diff options
| author | peter.ljunglof <peter.ljunglof@gu.se> | 2012-08-29 21:48:34 +0000 |
|---|---|---|
| committer | peter.ljunglof <peter.ljunglof@gu.se> | 2012-08-29 21:48:34 +0000 |
| commit | b416f5bbf7a1ac6d549f68424fec3af64ce34725 (patch) | |
| tree | e1fa64352974f9d715a6bf4a4157ba2dad684d1c /src/compiler/GF/Grammar | |
| parent | a7de16c34b7ccffc5ae0ac4fd004dfc155b4f546 (diff) | |
Use nub' instead of nub in some places, remove some unused nub imports
Diffstat (limited to 'src/compiler/GF/Grammar')
| -rw-r--r-- | src/compiler/GF/Grammar/CF.hs | 3 | ||||
| -rw-r--r-- | src/compiler/GF/Grammar/Lookup.hs | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/GF/Grammar/CF.hs b/src/compiler/GF/Grammar/CF.hs index 2ef625131..8b66bd72d 100644 --- a/src/compiler/GF/Grammar/CF.hs +++ b/src/compiler/GF/Grammar/CF.hs @@ -21,6 +21,7 @@ import GF.Infra.Option import GF.Infra.UseIO import GF.Data.Operations +import GF.Data.Utilities (nub') import Data.Char import Data.List @@ -101,7 +102,7 @@ cf2grammar rules = (buildTree abs, buildTree conc, cat) where (L _ (_,(c,_))):_ -> c -- the value category of the first rule _ -> error "empty CF" cats = [(cat, AbsCat (Just (L NoLoc []))) | - cat <- nub (concat (map cf2cat rules))] ----notPredef cat + cat <- nub' (concat (map cf2cat rules))] ----notPredef cat lincats = [(cat, CncCat (Just (L loc defLinType)) Nothing Nothing Nothing) | (cat,AbsCat (Just (L loc _))) <- cats] (funs,lins) = unzip (map cf2rule rules) diff --git a/src/compiler/GF/Grammar/Lookup.hs b/src/compiler/GF/Grammar/Lookup.hs index 0a06347d6..9e8b877a5 100644 --- a/src/compiler/GF/Grammar/Lookup.hs +++ b/src/compiler/GF/Grammar/Lookup.hs @@ -39,7 +39,7 @@ import GF.Grammar.Printer import GF.Grammar.Predef import GF.Grammar.Lockfield -import Data.List (nub,sortBy) +import Data.List (sortBy) import Control.Monad import Text.PrettyPrint import qualified Data.Map as Map |
