Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getImportLink :: Src -> Src
- getImportHash :: Src -> Maybe Src
- getLetInner :: Src -> Maybe Src
- getLetAnnot :: Src -> Maybe Src
- getLetIdentifier :: Src -> Src
- getLamIdentifier :: Src -> Maybe Src
- getForallIdentifier :: Src -> Maybe Src
- binderExprFromText :: Text -> Expr Src Import
- holeExpr :: Expr s a
Documentation
getImportLink :: Src -> Src Source #
getImportHash :: Src -> Maybe Src Source #
Given an Src of a import expression return the Src containing the hash annotation. If the import does not have a hash annotation return a 0-length Src where we can insert one.
getLetInner :: Src -> Maybe Src Source #
Parse the outermost binding in a Src descriptor of a let-block and return the rest. Ex. on input `let a = 0 let b = a in b` parses `let a = 0 ` and returns the Src descriptor containing `let b = a in b`.
getLetAnnot :: Src -> Maybe Src Source #
Given an Src of a let expression return the Src containing the type annotation. If the let expression does not have a type annotation return a 0-length Src where we can insert one.
getLetIdentifier :: Src -> Src Source #
Given an Src of a let expression return the Src containing the bound
identifier, i.e. given `let x = ... in ...` return the Src descriptor
containing x
. Returns the original Src if something goes wrong.
getLamIdentifier :: Src -> Maybe Src Source #
Cf. getLetIdentifier
.
getForallIdentifier :: Src -> Maybe Src Source #
Cf. getLetIdentifier
.