diff options
| author | bringert <bringert@cs.chalmers.se> | 2006-01-20 18:20:02 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2006-01-20 18:20:02 +0000 |
| commit | 92f22c8f5c13c381d323caeffe17b6dab4c2d927 (patch) | |
| tree | 781df98a6d12fc280e09b8b7758cf28eabf082da /src/GF/Data | |
| parent | 0f6c51f741668adc68491c79ca94cc4b98f5d154 (diff) | |
Use right start category names in si command.
Diffstat (limited to 'src/GF/Data')
| -rw-r--r-- | src/GF/Data/Utilities.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GF/Data/Utilities.hs b/src/GF/Data/Utilities.hs index a5ceb08d2..aaadad1fe 100644 --- a/src/GF/Data/Utilities.hs +++ b/src/GF/Data/Utilities.hs @@ -81,8 +81,8 @@ unionAll = nub . concat -- | Like 'lookup', but fails if the argument is not found, -- instead of returning Nothing. -lookup' :: Eq a => a -> [(a,b)] -> b -lookup' x = fromJust . lookup x +lookup' :: (Show a, Eq a) => a -> [(a,b)] -> b +lookup' x = fromMaybe (error $ "Not found: " ++ show x) . lookup x -- | Like 'find', but fails if nothing is found. find' :: (a -> Bool) -> [a] -> a |
