idris-1.0: Functional Programming Language with Dependent Types

Copyright | License : BSD3
Maintainer | The Idris Community.
Safe Haskell | None
Language | Haskell98

Idris.Elab.Clause

Description

Synopsis

- elabClauses :: ElabInfo -> FC -> FnOpts -> Name -> [PClause] -> Idris ()
- forceWith :: Ctxt OptInfo -> Term -> Term
- elabPE :: ElabInfo -> FC -> Name -> Term -> Idris [(Term, Term)]
- checkPossible :: ElabInfo -> FC -> Bool -> Name -> PTerm -> Idris (Maybe PTerm)
- checkPossibles :: ElabInfo -> FC -> Bool -> Name -> [PTerm] -> Idris [PTerm]
- findUnique :: Context -> Env -> Term -> [Name]
- elabClause :: ElabInfo -> FnOpts -> (Int, PClause) -> Idris (Either Term (Term, Term), PTerm)
- mapRHS :: (PTerm -> PTerm) -> PClause -> PClause
- mapRHSdecl :: (PTerm -> PTerm) -> PDecl -> PDecl

# Documentation

elabClauses :: ElabInfo -> FC -> FnOpts -> Name -> [PClause] -> Idris () #

Elaborate a collection of left-hand and right-hand pairs - that is, a top-level definition.

forceWith :: Ctxt OptInfo -> Term -> Term #

elabPE :: ElabInfo -> FC -> Name -> Term -> Idris [(Term, Term)] #

Find `static` applications in a term and partially evaluate them. Return any new transformation rules

checkPossible :: ElabInfo -> FC -> Bool -> Name -> PTerm -> Idris (Maybe PTerm) #

Checks if the clause is a possible left hand side. NOTE: A lot of this is repeated for reflected definitions in Idris.Elab.Term One day, these should be merged, but until then remember that if you edit this you might need to edit the other version...

checkPossibles :: ElabInfo -> FC -> Bool -> Name -> [PTerm] -> Idris [PTerm] #

findUnique :: Context -> Env -> Term -> [Name] #

elabClause :: ElabInfo -> FnOpts -> (Int, PClause) -> Idris (Either Term (Term, Term), PTerm) #

Return the elaborated LHS/RHS, and the original LHS with implicits added

mapRHS :: (PTerm -> PTerm) -> PClause -> PClause #

Apply a transformation to all RHSes and nested RHSs

mapRHSdecl :: (PTerm -> PTerm) -> PDecl -> PDecl #