ivan-m / SourceGraph

Static code analysis using graph-theoretic techniques
GNU General Public License v3.0
27 stars 11 forks source link

Support haskell-src-exts == 1.17.* #2

Closed utdemir closed 2 years ago

utdemir commented 8 years ago

There were some API change on haskell-src-exts 1.17, specifically:

Because of those commits, master was failing with:

Parsing/ParseModule.hs:118:15:
    Constructor ‘IVar’ should have 1 argument, but has been given 2
    In the pattern: IVar _ n
    In an equation for ‘createEnt’:
        createEnt mn (IVar _ n) = [Ent mn (nameOf n) NormalEntity]

Parsing/ParseModule.hs:134:18:
    Constructor ‘IVar’ should have 1 argument, but has been given 2
    In the pattern: IVar _ n
    In an equation for ‘listedEnt’:
        listedEnt _ el (IVar _ n) = [lookupEntity' el $ nameOf n]

Parsing/ParseModule.hs:167:18:
    Constructor ‘EVar’ should have 1 argument, but has been given 2
    In the pattern: EVar _ qn
    In an equation for ‘listedExp’:
        listedExp _ el (EVar _ qn)
          = maybe [] (return . lookupEntity el) $ qName qn

Parsing/ParseModule.hs:489:65:
    Couldn't match expected type ‘Binds’ with actual type ‘Maybe Binds’
    In the first argument of ‘getBindings’, namely ‘bs’
    In a stmt of a 'do' block: (bds, bcs) <- getBindings bs

Parsing/ParseModule.hs:571:56:
    Couldn't match expected type ‘Binds’ with actual type ‘Maybe Binds’
    In the first argument of ‘getBindings’, namely ‘bs’
    In a stmt of a 'do' block: (bd, bc) <- getBindings bs

Parsing/ParseModule.hs:673:53:
    Couldn't match expected type ‘Binds’ with actual type ‘Maybe Binds’
    In the first argument of ‘getBindings’, namely ‘bs’

I tried to patch the source and managed to get it compile, but I'm not familiar with either SourceGraph or haskell-src-exts; so I only tweaked until it type-checked. So, can you review and merge if everything looks okay? I'm specifically unsure about first parameters of noDefs calls.

Thanks.

utdemir commented 2 years ago

Closing as this project seems to be unmaintained.