hls-tactics-plugin-1.6.1.0: Wingman plugin for Haskell Language Server
Safe HaskellNone
LanguageHaskell2010

Wingman.Judgements.SYB

Description

Custom SYB traversals

Synopsis

Documentation

everythingContaining :: forall r. Monoid r => SrcSpan -> GenericQ r -> GenericQ r Source #

Like everything, but only looks inside Located terms that contain the given SrcSpan.

genericIsSubspan :: SrcSpan -> GenericQ (Maybe Bool) Source #

Helper function for implementing everythingWithin

NOTE(sandy): Subtly broken. In an ideal world, this function shuld return Just False for nodes of any type which do not contain the span. But if this functionality exists anywhere within the SYB machinery, I have yet to find it.

mkQ1 Source #

Arguments

:: forall a r f. (Data a, Data (f ())) 
=> f ()

Polymorphic constructor to match on

-> r

Default value

-> (forall b. f b -> r)

Polymorphic match

-> a 
-> r 

Like mkQ, but allows for polymorphic instantiation of its specific case. This instantation matches whenever the dynamic value has the same constructor as the proxy f () value.

sameTypeModuloLastApp :: forall a b. (Typeable a, Typeable b) => Bool Source #

Given a ~ f1 a1 and b ~ f2 b2, returns true if f1 ~ f2.