yi-0.11.2: The Haskell-Scriptable Editor

LicenseGPL-2
Maintaineryi-devel@googlegroups.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010
Extensions
  • MonoLocalBinds
  • TypeFamilies
  • DeriveFoldable
  • TypeSynonymInstances
  • FlexibleInstances
  • KindSignatures
  • ExplicitNamespaces
  • NondecreasingIndentation

Yi.Syntax.Haskell

Description

NOTES: Note if the layout of the first line (not comments) is wrong the parser will only parse what is in the blocks given by Layout.hs

Synopsis

Documentation

data Exp t Source

Exp can be expression or declaration

Constructors

PModule 

Fields

comments :: [t]
 
progMod :: Maybe (PModule t)
 
ProgMod 

Fields

modDecl :: PModuleDecl t
 
body :: PModule t

The module declaration part

Body 

Fields

imports :: Exp t
 
content :: Block t
 
extraContent :: Block t

The body of the module

PModuleDecl 

Fields

moduleKeyword :: PAtom t
 
name :: PAtom t
 
exports :: Exp t
 
whereKeyword :: Exp t
 
PImport 

Fields

importKeyword :: PAtom t
 
qual :: Exp t
 
name' :: PAtom t
 
as :: Exp t
 
specification :: Exp t
 
TS t [Exp t]

Type signature

PType

Type declaration

Fields

typeKeyword :: PAtom t
 
typeCons :: Exp t
 
equal :: PAtom t
 
btype :: Exp t
 
PData

Data declaration

Fields

dataKeyword :: PAtom t
 
dtypeCons :: Exp t
 
dEqual :: Exp t
 
dataRhs :: Exp t
 
PData' 

Fields

dEqual :: PAtom t
 
dataCons :: Exp t

Data declaration RHS

PClass 

Fields

cKeyword :: PAtom t
 
cHead :: Exp t
 
cwhere :: Exp t

Class declaration

Paren (PAtom t) [Exp t] (PAtom t)

A parenthesized, bracked or braced

Block [Exp t]

A block of things separated by layout

PAtom t [t]

An atom is a token followed by many comments

Expr [Exp t] 
PWhere (PAtom t) (Exp t) (Exp t)

Where clause

Bin (Exp t) (Exp t) 
PError 

Fields

errorTok :: t
 
marker :: t
 
commentList :: [t]

An wrapper for errors

RHS (PAtom t) (Exp t)

Righthandside of functions with =

Opt (Maybe (Exp t))

An optional

Modid t [t]

Module identifier

Context (Exp t) (Exp t) (PAtom t) 
PGuard [PGuard t]

Righthandside of functions with | the PAtom in PGuard' does not contain any comments

PGuard' (PAtom t) (Exp t) (PAtom t) 
TC (Exp t)

Type constructor data constructor same as with the TC constructor

DC (Exp t)

Data constructor

PLet (PAtom t) (Exp t) (Exp t)

let expression

PIn t [Exp t] 

Instances

parse :: P TT (Tree TT) Source

The parser