Skip to content
This repository has been archived by the owner on Mar 4, 2023. It is now read-only.

Commit

Permalink
Use collectPatBinders instead of custom implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
nominolo committed Apr 23, 2010
1 parent 6ae573e commit 5afe6b1
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/Scion/Inspect.hs
Expand Up @@ -28,7 +28,6 @@ import Scion.Inspect.TypeOf
import Scion.Types.Notes
import Scion.Types.Outline

import GHC
import Bag
import Var ( varType )
import DataCon ( dataConUserType )
Expand All @@ -38,8 +37,6 @@ import VarEnv ( emptyTidyEnv )
import Data.Generics.Biplate
import Data.Generics.UniplateStr hiding ( Str (..) )
import qualified Data.Generics.Str as U
import Outputable
import GHC.SYB.Utils
import Data.List ( foldl' )

#ifdef SCION_DEBUG
Expand Down Expand Up @@ -179,14 +176,7 @@ valBinds base_dir grp =
where
-- return names bound by pattern
pat_names :: Pat Name -> [Name]
pat_names pat =
[ n | Just n <- map pat_bind_name
(trace (showData Renamer 2 (pat, universe pat)) (universe pat)) ]

pat_bind_name :: Pat Name -> Maybe Name
pat_bind_name (VarPat id) = Just id
pat_bind_name (AsPat (L _ id) _) = Just id
pat_bind_name _ = Nothing
pat_names pat = collectPatBinders (L noSrcSpan pat)

instBinds :: FilePath -> HsGroup Name -> [OutlineDef]
instBinds base_dir grp =
Expand Down

0 comments on commit 5afe6b1

Please sign in to comment.