yi-0.7.1: The Haskell-Scriptable Editor

Safe HaskellNone

Yi.Prelude

Contents

Synopsis

Documentation

(<>) :: Monoid a => a -> a -> aSource

(++) :: [a] -> [a] -> [a]

Append two lists, i.e.,

 [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
 [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]

If the first list is not finite, the result is the first list.

(=<<) :: Monad m => (a -> m b) -> m a -> m b

Same as >>=, but with the arguments interchanged.

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c

Right-to-left Kleisli composition of monads. (>=>), with the arguments flipped

($!) :: (a -> b) -> a -> b

Strict (call-by-value) application, defined in terms of seq.

data Double

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

class Binary t

The Binary class provides put and get, methods to encode and decode a Haskell value to a lazy ByteString. It mirrors the Read and Show classes for textual representation of Haskell types, and is suitable for serialising Haskell values to disk, over the network.

For parsing and generating simple external binary formats (e.g. C structures), Binary may be used, but in general is not suitable for complex protocols. Instead use the Put and Get primitives directly.

Instances of Binary should satisfy the following property:

 decode . encode == id

That is, the get and put methods should be the inverse of each other. A range of instances are provided for basic Haskell types.

Instances

Binary Bool 
Binary Char 
Binary Double 
Binary Float 
Binary Int 
Binary Int8 
Binary Int16 
Binary Int32 
Binary Int64 
Binary Integer 
Binary Ordering 
Binary Word 
Binary Word8 
Binary Word16 
Binary Word32 
Binary Word64 
Binary () 
Binary PackageName 
Binary PackageIdentifier 
Binary InstalledPackageId 
Binary License 
Binary Version 
Binary ByteString 
Binary ByteString 
Binary SerialRep 
Binary ConcreteTypeRep 
Binary IntSet 
Binary UTCTime 
Binary Editor 
Binary Rope 
Binary DynamicValues 
Binary Direction 
Binary WindowRef 
Binary Size 
Binary Point 
Binary BufferRef 
Binary Mark 
Binary SearchOption 
Binary SearchExp 
Binary Region 
Binary Killring 
Binary Jump 
Binary Window 
Binary Tab 
Binary MarkValue 
Binary Update 
Binary UIUpdate 
Binary Change 
Binary URList 
Binary FBuffer 
Binary RegionStyle 
Binary TempBufferNameHint 
Binary History 
Binary TagTable 
Binary VimTagStack 
Binary ArticleDB 
Binary VimState 
Binary GotoCharCommand 
Binary VimMode 
Binary Register 
Binary RepeatableAction 
Binary CabalBuffer 
Binary MarkInfo 
Binary DependentMarks 
Binary BufferMarks 
Binary a => Binary [a] 
(Binary a, Integral a) => Binary (Ratio a) 
Binary a => Binary (Maybe a) 
Binary m => Binary (InstalledPackageInfo_ m) 
Binary e => Binary (Tree e) 
Binary e => Binary (Seq e) 
Binary e => Binary (IntMap e) 
(Ord a, Binary a) => Binary (Set a) 
Binary a_1627393425 => Binary (PointedList a_1627393425) 
Binary a_1628274730 => Binary (MarkSet a_1628274730) 
Binary (Mode syntax) 
(Binary a, Binary b) => Binary (Either a b) 
(Binary a, Binary b) => Binary (a, b) 
(Binary i, Ix i, Binary e, IArray UArray e) => Binary (UArray i e) 
(Binary i, Ix i, Binary e) => Binary (Array i e) 
(Ord k, Binary k, Binary e) => Binary (Map k e) 
(Eq k, Hashable k, Binary k, Binary v) => Binary (HashMap k v) 
(Binary a, Binary b, Binary c) => Binary (a, b, c) 
(Binary a, Binary b, Binary c, Binary d) => Binary (a, b, c, d) 
(Binary a, Binary b, Binary c, Binary d, Binary e) => Binary (a, b, c, d, e) 
(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f) => Binary (a, b, c, d, e, f) 
(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g) => Binary (a, b, c, d, e, f, g) 
(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g, Binary h) => Binary (a, b, c, d, e, f, g, h) 
(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g, Binary h, Binary i) => Binary (a, b, c, d, e, f, g, h, i) 
(Binary a, Binary b, Binary c, Binary d, Binary e, Binary f, Binary g, Binary h, Binary i, Binary j) => Binary (a, b, c, d, e, f, g, h, i, j) 

data Char

The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) characters (see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character set (the first 128 characters). A character literal in Haskell has type Char.

To convert a Char to or from the corresponding Int value defined by Unicode, use toEnum and fromEnum from the Enum class respectively (or equivalently ord and chr).

data Either a b

The Either type represents values with two possibilities: a value of type Either a b is either Left a or Right b.

The Either type is sometimes used to represent a value which is either correct or an error; by convention, the Left constructor is used to hold an error value and the Right constructor is used to hold a correct value (mnemonic: "right" also means "correct").

Constructors

Left a 
Right b 

Instances

Typeable2 Either 
Error e => MonadError e (Either e) 
Monad (Either e) 
Functor (Either a) 
MonadFix (Either e) 
Error e => MonadPlus (Either e) 
Applicative (Either e) 
Generic1 (Either a) 
Error e => Alternative (Either e) 
(Eq a, Eq b) => Eq (Either a b) 
(Data a, Data b) => Data (Either a b) 
(Ord a, Ord b) => Ord (Either a b) 
(Read a, Read b) => Read (Either a b) 
(Show a, Show b) => Show (Either a b) 
Generic (Either a b) 
(Arbitrary a, Arbitrary b) => Arbitrary (Either a b) 
(CoArbitrary a, CoArbitrary b) => CoArbitrary (Either a b) 
(Binary a, Binary b) => Binary (Either a b) 
(Lift a, Lift b) => Lift (Either a b) 
(Hashable a, Hashable b) => Hashable (Either a b) 

type Endom a = a -> aSource

class Eq a where

The Eq class defines equality (==) and inequality (/=). All the basic datatypes exported by the Prelude are instances of Eq, and Eq may be derived for any datatype whose constituents are also instances of Eq.

Minimal complete definition: either == or /=.

Methods

(==) :: a -> a -> Bool

(/=) :: a -> a -> Bool

Instances

Eq Bool 
Eq Char 
Eq Double 
Eq Float 
Eq Int 
Eq Int8 
Eq Int16 
Eq Int32 
Eq Int64 
Eq Integer 
Eq Ordering 
Eq Word 
Eq Word8 
Eq Word16 
Eq Word32 
Eq Word64 
Eq Exp 
Eq Match 
Eq Clause 
Eq Pat 
Eq Type 
Eq Dec 
Eq Name 
Eq FunDep 
Eq Pred 
Eq TyVarBndr 
Eq () 
Eq IOException 
Eq PackageDescription 
Eq BuildType 
Eq Library 
Eq Executable 
Eq TestSuite 
Eq TestSuiteInterface 
Eq TestType 
Eq Benchmark 
Eq BenchmarkInterface 
Eq BenchmarkType 
Eq BuildInfo 
Eq SourceRepo 
Eq RepoKind 
Eq RepoType 
Eq GenericPackageDescription 
Eq Flag 
Eq FlagName 
Eq ConfVar 
Eq Field 
Eq CompilerFlavor 
Eq CompilerId 
Eq PackageName 
Eq PackageIdentifier 
Eq InstalledPackageId 
Eq Dependency 
Eq License 
Eq VersionRange 
Eq VersionIntervals 
Eq LowerBound 
Eq UpperBound 
Eq Bound 
Eq Language 
Eq Extension 
Eq KnownExtension 
Eq ModuleName 
Eq Version 
Eq DI 
Eq DL 
Eq Handle 
Eq State 
Eq Finalizers 
Eq Number 
Eq SpecConstrAnnotation 
Eq Constr

Equality of constructors

Eq DataRep 
Eq ConstrRep 
Eq Fixity 
Eq HandlePosn 
Eq FdKey 
Eq TimeoutKey 
Eq CDev 
Eq CIno 
Eq CMode 
Eq COff 
Eq CPid 
Eq CSsize 
Eq CGid 
Eq CNlink 
Eq CUid 
Eq CCc 
Eq CSpeed 
Eq CTcflag 
Eq CRLim 
Eq Fd 
Eq ThreadId 
Eq BlockReason 
Eq ThreadStatus 
Eq Errno 
Eq AsyncException 
Eq ArrayException 
Eq ExitCode 
Eq IOErrorType 
Eq BufferMode 
Eq Newline 
Eq NewlineMode 
Eq CodingProgress 
Eq BufferState 
Eq All 
Eq Any 
Eq Arity 
Eq Fixity 
Eq Associativity 
Eq TypeRepKey 
Eq GeneralCategory 
Eq CChar 
Eq CSChar 
Eq CUChar 
Eq CShort 
Eq CUShort 
Eq CInt 
Eq CUInt 
Eq CLong 
Eq CULong 
Eq CLLong 
Eq CULLong 
Eq CFloat 
Eq CDouble 
Eq CPtrdiff 
Eq CSize 
Eq CWchar 
Eq CSigAtomic 
Eq CClock 
Eq CTime 
Eq CUSeconds 
Eq CSUSeconds 
Eq CIntPtr 
Eq CUIntPtr 
Eq CIntMax 
Eq CUIntMax 
Eq IODeviceType 
Eq SeekMode 
Eq IOMode 
Eq Fingerprint 
Eq Lexeme 
Eq MaskingState 
Eq ArithException 
Eq TypeRep 
Eq TyCon 
Eq ByteString 
Eq ByteString 
Eq ConcreteTypeRep 
Eq IntSet 
Eq RequiredInstance 
Eq Ans 
Eq TyLit 
Eq Con 
Eq Strict 
Eq RuleBndr 
Eq Phases 
Eq RuleMatch 
Eq Inline 
Eq Pragma 
Eq Safety 
Eq Callconv 
Eq Foreign 
Eq FamFlavour 
Eq Range 
Eq Stmt 
Eq Guard 
Eq Body 
Eq FixityDirection 
Eq Fixity 
Eq NameSpace 
Eq NameFlavour 
Eq OccName 
Eq PkgName 
Eq ModName 
Eq GuardedAlt 
Eq GuardedAlts 
Eq Alt 
Eq FieldUpdate 
Eq QualStmt 
Eq Stmt 
Eq PatField 
Eq RPat 
Eq RPatOp 
Eq PXAttr 
Eq Pat 
Eq WarningText 
Eq RuleVar 
Eq Rule 
Eq Activation 
Eq ModulePragma 
Eq CallConv 
Eq Safety 
Eq Splice 
Eq Bracket 
Eq XAttr 
Eq XName 
Eq Exp 
Eq Literal 
Eq Asst 
Eq FunDep 
Eq Kind 
Eq TyVarBind 
Eq Type 
Eq GuardedRhs 
Eq Rhs 
Eq BangType 
Eq InstDecl 
Eq ClassDecl 
Eq GadtDecl 
Eq ConDecl 
Eq QualConDecl 
Eq Match 
Eq IPBind 
Eq Binds 
Eq DataOrNew 
Eq Annotation 
Eq Decl 
Eq Assoc 
Eq ImportSpec 
Eq ImportDecl 
Eq ExportSpec 
Eq Module 
Eq CName 
Eq Op 
Eq QOp 
Eq IPName 
Eq Name 
Eq QName 
Eq SpecialCon 
Eq ModuleName 
Eq Lit 
Eq Permissions 
Eq TickDensity 
Eq Discr 
Eq TyLit 
Eq Prec 
Eq UniqueSet 
Eq LabelSet 
Eq Label 
Eq Loc 
Eq RecompileRequired 
Eq CheckHiWay 
Eq TraceBinIFaceReading 
Eq AltCon 
Eq Var 
Eq Unique 
Eq TyThing 
Eq ChangeFlag 
Eq FontFace 
Eq FontFamily 
Eq Font 
Eq PangoGravityHint 
Eq PangoGravity 
Eq Underline 
Eq Weight 
Eq FontStyle 
Eq Language 
Eq PangoDirection 
Eq PangoContext 
Eq Stretch 
Eq Variant 
Eq EllipsizeMode 
Eq FontMap 
Eq GObject 
Eq AtkObject 
Eq Colormap 
Eq Visual 
Eq Device 
Eq TipsQuery 
Eq Item 
Eq ListItem 
Eq InputDialog 
Eq CList 
Eq CTree 
Eq List 
Eq Preview 
Eq ItemFactory 
Eq CellLayout 
Eq TreeStore 
Eq ListStore 
Eq AccelGroup 
Eq AccelMap 
Eq WidgetHelpType 
Eq PrintStatus 
Eq PrintOperationAction 
Eq PrintOperationResult 
Eq PrintError 
Eq Requisition 
Eq ResponseId 
Eq NativeWindowId 
Eq IconSize 
Eq KeymapKey 
Eq Atom 
Eq Accessible 
Eq Keymap 
Eq DisplayManager 
Eq AppLaunchContext 
Eq PrintSettings 
Eq PrintOperation 
Eq PrintOperationPreview 
Eq PageSetup 
Eq PrintContext 
Eq RecentChooser 
Eq RecentManager 
Eq Drawable 
Eq DrawWindow 
Eq Pixmap 
Eq Screen 
Eq Display 
Eq Settings 
Eq TextBuffer 
Eq TextTag 
Eq TextTagTable 
Eq Style 
Eq RcStyle 
Eq DragContext 
Eq Pixbuf 
Eq PixbufAnimation 
Eq PixbufSimpleAnim 
Eq PixbufAnimationIter 
Eq TextChildAnchor 
Eq TextMark 
Eq Object 
Eq RecentFilter 
Eq Widget 
Eq HSV 
Eq Misc 
Eq Label 
Eq AccelLabel 
Eq Arrow 
Eq Image 
Eq Container 
Eq ToolPalette 
Eq ToolItemGroup 
Eq Bin 
Eq Alignment 
Eq Frame 
Eq AspectFrame 
Eq Button 
Eq ScaleButton 
Eq VolumeButton 
Eq LinkButton 
Eq ToggleButton 
Eq CheckButton 
Eq RadioButton 
Eq ColorButton 
Eq FontButton 
Eq OptionMenu 
Eq MenuItem 
Eq CheckMenuItem 
Eq RadioMenuItem 
Eq TearoffMenuItem 
Eq ImageMenuItem 
Eq SeparatorMenuItem 
Eq Window 
Eq Assistant 
Eq OffscreenWindow 
Eq Dialog 
Eq AboutDialog 
Eq ColorSelectionDialog 
Eq FileSelection 
Eq FileChooserDialog 
Eq FontSelectionDialog 
Eq MessageDialog 
Eq Plug 
Eq EventBox 
Eq HandleBox 
Eq ScrolledWindow 
Eq Viewport 
Eq Expander 
Eq ComboBox 
Eq ComboBoxEntry 
Eq ToolItem 
Eq ToolButton 
Eq MenuToolButton 
Eq ToggleToolButton 
Eq RadioToolButton 
Eq SeparatorToolItem 
Eq Box 
Eq ButtonBox 
Eq HButtonBox 
Eq VButtonBox 
Eq VBox 
Eq RecentChooserWidget 
Eq ColorSelection 
Eq FontSelection 
Eq FileChooserWidget 
Eq HBox 
Eq InfoBar 
Eq Combo 
Eq FileChooserButton 
Eq Statusbar 
Eq Fixed 
Eq Paned 
Eq HPaned 
Eq VPaned 
Eq IconView 
Eq Layout 
Eq MenuShell 
Eq Menu 
Eq RecentChooserMenu 
Eq MenuBar 
Eq Notebook 
Eq Socket 
Eq Table 
Eq TextView 
Eq Toolbar 
Eq TreeView 
Eq Calendar 
Eq CellView 
Eq DrawingArea 
Eq Spinner 
Eq Entry 
Eq SpinButton 
Eq Ruler 
Eq HRuler 
Eq VRuler 
Eq Range 
Eq Scale 
Eq HScale 
Eq VScale 
Eq Scrollbar 
Eq HScrollbar 
Eq VScrollbar 
Eq Separator 
Eq HSeparator 
Eq VSeparator 
Eq Invisible 
Eq ProgressBar 
Eq Adjustment 
Eq IMContext 
Eq IMMulticontext 
Eq IMContextSimple 
Eq Tooltips 
Eq TreeViewColumn 
Eq CellRenderer 
Eq CellRendererSpinner 
Eq CellRendererPixbuf 
Eq CellRendererText 
Eq CellRendererAccel 
Eq CellRendererSpin 
Eq CellRendererCombo 
Eq CellRendererToggle 
Eq CellRendererProgress 
Eq FileFilter 
Eq Builder 
Eq TreeSortable 
Eq Tooltip 
Eq StatusIcon 
Eq TreeSelection 
Eq TreeModel 
Eq TreeModelSort 
Eq TreeModelFilter 
Eq IconFactory 
Eq IconTheme 
Eq SizeGroup 
Eq Clipboard 
Eq EntryCompletion 
Eq EntryBuffer 
Eq Action 
Eq RecentAction 
Eq ToggleAction 
Eq RadioAction 
Eq ActionGroup 
Eq UIManager 
Eq WindowGroup 
Eq CellEditable 
Eq Editable 
Eq FileChooser 
Eq GC 
Eq AccelFlags 
Eq ArrowType 
Eq AttachOptions 
Eq MouseButton 
Eq ButtonBoxStyle 
Eq CalendarDisplayOptions 
Eq Click 
Eq CornerType 
Eq DeleteType 
Eq DestDefaults 
Eq DragResult 
Eq DirectionType 
Eq Justification 
Eq MatchType 
Eq MenuDirectionType 
Eq MetricType 
Eq MovementStep 
Eq Orientation 
Eq Packing 
Eq PackType 
Eq PathPriorityType 
Eq PathType 
Eq PolicyType 
Eq PositionType 
Eq ProgressBarOrientation 
Eq ReliefStyle 
Eq ResizeMode 
Eq ScrollType 
Eq ScrollStep 
Eq SelectionMode 
Eq ShadowType 
Eq SortType 
Eq StateType 
Eq SubmenuDirection 
Eq SubmenuPlacement 
Eq SpinButtonUpdatePolicy 
Eq SpinType 
Eq TargetFlags 
Eq TextDirection 
Eq TextSearchFlags 
Eq TextWindowType 
Eq ToolbarStyle 
Eq TreeViewColumnSizing 
Eq UpdateType 
Eq Visibility 
Eq WindowPosition 
Eq WindowType 
Eq WrapMode 
Eq EntryIconPosition 
Eq AnchorType 
Eq CapStyle 
Eq CrossingMode 
Eq DragProtocol 
Eq DragAction 
Eq Dither 
Eq EventMask 
Eq Modifier 
Eq ExtensionMode 
Eq Fill 
Eq Function 
Eq InputCondition 
Eq JoinStyle 
Eq LineStyle 
Eq NotifyType 
Eq ScrollDirection 
Eq SubwindowMode 
Eq VisibilityState 
Eq WindowState 
Eq WindowEdge 
Eq WindowTypeHint 
Eq Gravity 
Eq GrabStatus 
Eq OwnerChange 
Eq Rectangle 
Eq Color 
Eq IOCondition 
Eq PhantomModule 
Eq ModuleElem 
Eq Extension 
Eq TimeLocale 
Eq Message 
Eq SourcePos 
Eq Pattern 
Eq PatternSet 
Eq PatternSetCharacterClass 
Eq PatternSetCollatingElement 
Eq PatternSetEquivalenceClass 
Eq DoPa 
Eq OP 
Eq QT 
Eq WhichTest 
Eq TagTask 
Eq TagUpdate 
Eq Action 
Eq DelimPolicy 
Eq CondensePolicy 
Eq EndPolicy 
Eq LocalTime 
Eq TimeOfDay 
Eq TimeZone 
Eq UTCTime 
Eq NominalDiffTime 
Eq Day 
Eq UniversalTime 
Eq DiffTime 
Eq GroupEntry 
Eq UserEntry 
Eq DisplayRegion 
Eq Key 
Eq Modifier 
Eq Button 
Eq Event 
Eq Image 
Eq Attr 
Eq FixedAttr 
Eq Color 
Eq Text 
Eq Text 
Eq Rope 
Eq Event 
Eq Key 
Eq Modifier 
Eq PangoLayoutRaw 
Eq FontSet 
Eq Rectangle 
Eq AnyLayoutManager 
Eq Orientation 
Eq Color 
Eq Attributes 
Eq Direction 
Eq WindowRef 
Eq Size 
Eq Point 
Eq BufferRef 
Eq Mark 
Eq SearchOption 
Eq Posn 
Eq Token 
Eq ReservedOp 
Eq Reserved 
Eq Token 
Eq OpType 
Eq ReservedType 
Eq CommentType 
Eq Token 
Eq Operator 
Eq Reserved 
Eq Token 
Eq HlState 
Eq Token 
Eq Window 
Eq Tab

Equality on tab identity (the tkey)

Eq Report 
Eq Warning 
Eq Error 
Eq MarkValue 
Eq Overlay 
Eq OvlLayer 
Eq IndentBehaviour 
Eq IndentSettings 
Eq FBuffer 
Eq BoundarySide 
Eq RegionStyle 
Eq QueuedUpdate 
Eq VimMode 
Eq RepeatableAction 
Eq SearchResult 
Eq MarkInfo 
Eq DependentMarks 
Eq BufferMarks 
Eq a => Eq [a] 
Eq a => Eq (Ratio a) 
Eq (StablePtr a) 
Eq (Ptr a) 
Eq (FunPtr a) 
Eq a => Eq (Maybe a) 
Eq c => Eq (Condition c) 
Eq a => Eq (Diff a) 
Eq (ForeignPtr a) 
Eq (Fixed a) 
Eq (Chan a) 
Eq (TVar a) 
Eq a => Eq (Dual a) 
Eq a => Eq (Sum a) 
Eq a => Eq (Product a) 
Eq a => Eq (First a) 
Eq a => Eq (Last a) 
Eq (IORef a) 
Eq a => Eq (Down a) 
Eq (MVar a) 
Eq a => Eq (Tree a) 
Eq a => Eq (Seq a) 
Eq a => Eq (ViewL a) 
Eq a => Eq (ViewR a) 
Eq a => Eq (IntMap a) 
Eq a => Eq (Set a) 
Eq v => Eq (UniqueMap v) 
Eq v => Eq (LabelMap v) 
Eq id => Eq (Tickish id) 
Eq ele => Eq (UniqFM ele) 
Eq a => Eq (PointedList a) 
Eq a => Eq (Chunk a) 
Eq v => Eq (MaybeDefault v) 
Eq lm => Eq (Transposed lm) 
Eq a => Eq (Layout a) 
Eq (Tok a) 
Eq a => Eq (Vector a) 
(Eq a, Eq b) => Eq (Either a b) 
(Eq a, Eq b) => Eq (a, b) 
(Ix ix, Eq e, IArray UArray e) => Eq (UArray ix e) 
(Ix i, Eq e) => Eq (Array i e) 
Eq (STRef s a) 
(Eq k, Eq a) => Eq (Map k a) 
(Eq a, Eq (s a)) => Eq (ViewL s a) 
(Eq a, Eq (s a)) => Eq (ViewR s a) 
Eq a => Eq (FingerTree v a) 
Eq (ColumnId row ty) 
(Eq k, Eq v) => Eq (Leaf k v) 
(Eq k, Eq v) => Eq (HashMap k v) 
Eq a => Eq (Stream Id a) 
Eq t => Eq (::: t doc) 
(Eq a, Eq b, Eq c) => Eq (a, b, c) 
(Eq v, Eq c, Eq a) => Eq (CondTree v c a) 
Eq (STUArray s i e) 
Eq (STArray s i e) 
(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) 
(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 

class Num a => Fractional a where

Fractional numbers, supporting real division.

Minimal complete definition: fromRational and (recip or (/))

Methods

(/) :: a -> a -> a

fractional division

recip :: a -> a

reciprocal fraction

fromRational :: Rational -> a

Conversion from a Rational (that is Ratio Integer). A floating literal stands for an application of fromRational to a value of type Rational, so such literals have type (Fractional a) => a.

class Functor f where

The Functor class is used for types that can be mapped over. Instances of Functor should satisfy the following laws:

 fmap id  ==  id
 fmap (f . g)  ==  fmap f . fmap g

The instances of Functor for lists, Maybe and IO satisfy these laws.

Methods

fmap :: (a -> b) -> f a -> f b

Instances

Functor [] 
Functor IO 
Functor Q 
Functor Maybe 
Functor Rose 
Functor Gen 
Functor Id 
Functor ZipList 
Functor Handler 
Functor STM 
Functor ReadPrec 
Functor ReadP 
Functor PutM 
Functor Get 
Functor Digit 
Functor Node 
Functor Elem 
Functor Id 
Functor FingerTree 
Functor Tree 
Functor Seq 
Functor ViewL 
Functor ViewR 
Functor IntMap 
Functor DList 
Functor AlexLastAcc 
Functor Ghc 
Functor DFunArg 
Functor UniqFM 
Functor Identity 
Functor Consumed 
Functor PointedList 
Functor Layout 
Functor MatchResult 
Functor Span 
Functor Tok 
Functor Tree 
Functor MarkSet 
Functor BufferM 
Functor EditorM 
Functor YiM 
Functor ControlM 
Functor Box 
Functor Id 
Functor Vector 
Functor ConfigM 
Functor Ghc 
Functor ((->) r) 
Functor (Either a) 
Functor ((,) a) 
Functor (ST s) 
Ix i => Functor (Array i) 
Functor (StateL s) 
Functor (StateR s) 
Functor (Const m) 
Monad m => Functor (WrappedMonad m) 
Functor (ST s) 
Arrow a => Functor (ArrowMonad a) 
Functor (State s) 
Functor (Map k) 
Functor s => Functor (ViewL s) 
Functor s => Functor (ViewR s) 
Functor (MaybeC ex) 
Functor (MaybeO ex) 
Functor m => Functor (GhcT m) 
Functor m => Functor (GhcT m) 
Functor m => Functor (InterpreterT m) 
Functor m => Functor (ListT m) 
Functor (HashMap k) 
Functor (Parser s) 
Functor m => Functor (MaybeT m) 
Functor m => Functor (IdentityT m) 
Functor (Scanner st) 
Monad m => Functor (Stream m) 
Functor m => Functor (MTLAdapter m) 
Functor ((,,) a b) 
Functor (Parser r s) 
Arrow a => Functor (WrappedArrow a b) 
Functor (ContT r m) 
Functor m => Functor (ErrorT e m) 
Functor m => Functor (ReaderT r m) 
Functor m => Functor (StateT s m) 
Functor m => Functor (StateT s m) 
Functor m => Functor (WriterT w m) 
Functor m => Functor (WriterT w m) 
Functor (Reply s u) 
Functor (I event w) 
Functor (ParsecT s u m) 
Functor m => Functor (RWST r w s m) 
Functor m => Functor (RWST r w s m) 

data IO a

A value of type IO a is a computation which, when performed, does some I/O before returning a value of type a.

There is really only one way to "perform" an I/O action: bind it to Main.main in your program. When your program is run, the I/O will be performed. It isn't possible to perform I/O from an arbitrary function, unless that function is itself in the IO monad and called at some point, directly or indirectly, from Main.main.

IO is a monad, so IO actions can be combined using either the do-notation or the >> and >>= operations from the Monad class.

Instances

class Initializable a whereSource

The default value. If a function tries to get a copy of the state, but the state hasn't yet been created, initial will be called to supply *some* value. The value of initial will probably be something like Nothing, [], "", or empty - compare the mempty of Data.Monoid.

Methods

initial :: aSource

class (Real a, Enum a) => Integral a where

Integral numbers, supporting integer division.

Minimal complete definition: quotRem and toInteger

Methods

quot :: a -> a -> a

integer division truncated toward zero

rem :: a -> a -> a

integer remainder, satisfying

 (x `quot` y)*y + (x `rem` y) == x

div :: a -> a -> a

integer division truncated toward negative infinity

mod :: a -> a -> a

integer modulus, satisfying

 (x `div` y)*y + (x `mod` y) == x

quotRem :: a -> a -> (a, a)

simultaneous quot and rem

divMod :: a -> a -> (a, a)

simultaneous div and mod

toInteger :: a -> Integer

conversion to Integer

class Bounded a where

The Bounded class is used to name the upper and lower limits of a type. Ord is not a superclass of Bounded since types that are not totally ordered may also have upper and lower bounds.

The Bounded class may be derived for any enumeration type; minBound is the first constructor listed in the data declaration and maxBound is the last. Bounded may also be derived for single-constructor datatypes whose constituent types are in Bounded.

Methods

minBound :: a

maxBound :: a

Instances

Bounded Bool 
Bounded Char 
Bounded Int 
Bounded Int8 
Bounded Int16 
Bounded Int32 
Bounded Int64 
Bounded Ordering 
Bounded Word 
Bounded Word8 
Bounded Word16 
Bounded Word32 
Bounded Word64 
Bounded () 
Bounded KnownExtension 
Bounded CDev 
Bounded CIno 
Bounded CMode 
Bounded COff 
Bounded CPid 
Bounded CSsize 
Bounded CGid 
Bounded CNlink 
Bounded CUid 
Bounded CTcflag 
Bounded CRLim 
Bounded Fd 
Bounded All 
Bounded Any 
Bounded GeneralCategory 
Bounded CChar 
Bounded CSChar 
Bounded CUChar 
Bounded CShort 
Bounded CUShort 
Bounded CInt 
Bounded CUInt 
Bounded CLong 
Bounded CULong 
Bounded CLLong 
Bounded CULLong 
Bounded CPtrdiff 
Bounded CSize 
Bounded CWchar 
Bounded CSigAtomic 
Bounded CIntPtr 
Bounded CUIntPtr 
Bounded CIntMax 
Bounded CUIntMax 
Bounded FontMask 
Bounded PrintStatus 
Bounded PrintOperationAction 
Bounded PrintOperationResult 
Bounded PrintError 
Bounded AccelFlags 
Bounded AttachOptions 
Bounded CalendarDisplayOptions 
Bounded DestDefaults 
Bounded DragResult 
Bounded TargetFlags 
Bounded TextSearchFlags 
Bounded DragProtocol 
Bounded DragAction 
Bounded EventMask 
Bounded Modifier 
Bounded ExtensionMode 
Bounded InputCondition 
Bounded WindowState 
Bounded IOCondition 
Bounded Direction 
Bounded Point 
Bounded a => Bounded (Dual a) 
Bounded a => Bounded (Sum a) 
Bounded a => Bounded (Product a) 
(Bounded a, Bounded b) => Bounded (a, b) 
(Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) 
(Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h) => Bounded (a, b, c, d, e, f, g, h) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i) => Bounded (a, b, c, d, e, f, g, h, i) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j) => Bounded (a, b, c, d, e, f, g, h, i, j) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k) => Bounded (a, b, c, d, e, f, g, h, i, j, k) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n, Bounded o) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 

class Enum a where

Class Enum defines operations on sequentially ordered types.

The enumFrom... methods are used in Haskell's translation of arithmetic sequences.

Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1. See Chapter 10 of the Haskell Report for more details.

For any type that is an instance of class Bounded as well as Enum, the following should hold:

    enumFrom     x   = enumFromTo     x maxBound
    enumFromThen x y = enumFromThenTo x y bound
      where
        bound | fromEnum y >= fromEnum x = maxBound
              | otherwise                = minBound

Methods

succ :: a -> a

the successor of a value. For numeric types, succ adds 1.

pred :: a -> a

the predecessor of a value. For numeric types, pred subtracts 1.

toEnum :: Int -> a

Convert from an Int.

fromEnum :: a -> Int

Convert to an Int. It is implementation-dependent what fromEnum returns when applied to a value that is too large to fit in an Int.

enumFrom :: a -> [a]

Used in Haskell's translation of [n..].

enumFromThen :: a -> a -> [a]

Used in Haskell's translation of [n,n'..].

enumFromTo :: a -> a -> [a]

Used in Haskell's translation of [n..m].

enumFromThenTo :: a -> a -> a -> [a]

Used in Haskell's translation of [n,n'..m].

Instances

Enum Bool 
Enum Char 
Enum Double 
Enum Float 
Enum Int 
Enum Int8 
Enum Int16 
Enum Int32 
Enum Int64 
Enum Integer 
Enum Ordering 
Enum Word 
Enum Word8 
Enum Word16 
Enum Word32 
Enum Word64 
Enum () 
Enum KnownExtension 
Enum CDev 
Enum CIno 
Enum CMode 
Enum COff 
Enum CPid 
Enum CSsize 
Enum CGid 
Enum CNlink 
Enum CUid 
Enum CCc 
Enum CSpeed 
Enum CTcflag 
Enum CRLim 
Enum Fd 
Enum GeneralCategory 
Enum CChar 
Enum CSChar 
Enum CUChar 
Enum CShort 
Enum CUShort 
Enum CInt 
Enum CUInt 
Enum CLong 
Enum CULong 
Enum CLLong 
Enum CULLong 
Enum CFloat 
Enum CDouble 
Enum CPtrdiff 
Enum CSize 
Enum CWchar 
Enum CSigAtomic 
Enum CClock 
Enum CTime 
Enum CUSeconds 
Enum CSUSeconds 
Enum CIntPtr 
Enum CUIntPtr 
Enum CIntMax 
Enum CUIntMax 
Enum SeekMode 
Enum IOMode 
Enum PangoGravityHint 
Enum PangoGravity 
Enum Underline 
Enum Weight 
Enum FontStyle 
Enum PangoDirection 
Enum FontMask 
Enum TabAlign 
Enum LayoutAlignment 
Enum LayoutWrapMode 
Enum Stretch 
Enum Variant 
Enum GdkWindowHints

Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Values of the opacity parameter are clamped to the [0,1] range.) On X11 this has any effect only on X screens with a compositing manager running. See widgetIsComposited. On Windows it should work always.

Note that setting a window's opacity after the window has been shown causes it to flicker once on Windows.

  • Available since Gtk+ version 2.12
Enum EllipsizeMode 
Enum PixbufError 
Enum Colorspace 
Enum InterpType 
Enum PixbufRotation

Add an opacity layer to the Pixbuf.

  • This function returns a copy of the given src Pixbuf, leaving src unmodified. The new Pixbuf has an alpha (opacity) channel which defaults to 255 (fully opaque pixels) unless src already had an alpha channel in which case the original values are kept. Passing in a color triple (r,g,b) makes all pixels that have this color fully transparent (opacity of 0). The pixel color itself remains unchanged during this substitution.
Enum WidgetHelpType 
Enum FillRule 
Enum OverlapType 
Enum PrintStatus 
Enum PrintOperationAction 
Enum PrintOperationResult 
Enum PrintError 
Enum IconSize 
Enum AccelFlags

Arrow directions for the arrow widget

Enum ArrowType 
Enum AttachOptions

Mouse buttons.

Enum MouseButton 
Enum ButtonBoxStyle 
Enum CalendarDisplayOptions 
Enum Click 
Enum CornerType 
Enum DeleteType 
Enum DestDefaults

Gives an indication why a drag operation failed. The value can by obtained by connecting to the dragFailed signal.

Enum DragResult 
Enum DirectionType 
Enum Justification 
Enum MatchType 
Enum MenuDirectionType 
Enum MetricType 
Enum MovementStep 
Enum Orientation 
Enum Packing 
Enum PackType 
Enum PathPriorityType

Scrollbar policy types (for scrolled windows)

Enum PathType 
Enum PolicyType 
Enum PositionType 
Enum ProgressBarOrientation 
Enum ReliefStyle 
Enum ResizeMode 
Enum ScrollType 
Enum ScrollStep 
Enum SelectionMode 
Enum ShadowType 
Enum SortType 
Enum StateType 
Enum SubmenuDirection 
Enum SubmenuPlacement 
Enum SpinButtonUpdatePolicy 
Enum SpinType 
Enum TargetFlags

Is the text written from left to right or the exotic way?

Enum TextDirection 
Enum TextSearchFlags 
Enum TextWindowType 
Enum ToolbarStyle 
Enum TreeViewColumnSizing 
Enum UpdateType 
Enum Visibility 
Enum WindowPosition 
Enum WindowType 
Enum WrapMode 
Enum EntryIconPosition 
Enum AnchorType 
Enum CapStyle 
Enum CrossingMode 
Enum DragProtocol 
Enum DragAction

Specify how to dither colors onto the screen.

Removed in Gtk3.

Enum Dither 
Enum EventMask 
Enum Modifier 
Enum ExtensionMode 
Enum Fill 
Enum Function 
Enum InputCondition

Determines how adjacent line ends are drawn.

Removed in Gtk3.

Enum JoinStyle 
Enum LineStyle 
Enum NotifyType 
Enum ScrollDirection 
Enum SubwindowMode

visibility of a window

Enum VisibilityState 
Enum WindowState

These are hints for the window manager that indicate what type of function the window has. The window manager can use this when determining decoration and behaviour of the window. The hint must be set before mapping the window.

See the extended window manager hints specification for more details about window types.

Enum WindowEdge 
Enum WindowTypeHint 
Enum Gravity

Returned by pointerGrab and keyboardGrab to indicate success or the reason for the failure of the grab attempt.

GrabSuccess
the resource was successfully grabbed.
GrabAlreadyGrabbed
the resource is actively grabbed by another client.
GrabInvalidTime
the resource was grabbed more recently than the specified time.
GrabNotViewable
the grab window or the confine_to window are not viewable.
GrabFrozen
the resource is frozen by an active grab of another client.
Enum GrabStatus

Specifies why a selection ownership was changed.

OwnerChangeNewOwner
some other application claimed the ownership
OwnerChangeDestroy
the window was destroyed
OwnerChangeClose
the client was closed
Enum OwnerChange 
Enum IOCondition 
Enum Message 
Enum DoPa 
Enum WhichTest 
Enum NominalDiffTime 
Enum Day 
Enum DiffTime 
Enum Direction 
Enum WindowRef 
Enum Size 
Enum Point 
Integral a => Enum (Ratio a) 
Enum (Fixed a) 

data Maybe a

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error.

The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.

Constructors

Nothing 
Just a 

Instances

Monad Maybe 
Functor Maybe 
Typeable1 Maybe 
MonadFix Maybe 
MonadPlus Maybe 
Applicative Maybe 
Foldable Maybe 
Traversable Maybe 
Generic1 Maybe 
Alternative Maybe 
Eq a => Eq (Maybe a) 
Data a => Data (Maybe a) 
Ord a => Ord (Maybe a) 
Read a => Read (Maybe a) 
Show a => Show (Maybe a) 
Generic (Maybe a) 
Arbitrary a => Arbitrary (Maybe a) 
CoArbitrary a => CoArbitrary (Maybe a) 
Monoid a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S." Since there is no "Semigroup" typeclass providing just mappend, we use Monoid instead.

Binary a => Binary (Maybe a) 
Lift a => Lift (Maybe a) 
Hashable a => Hashable (Maybe a) 
Initializable (Maybe a) 

class Monad m where

The Monad class defines the basic operations over a monad, a concept from a branch of mathematics known as category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an abstract datatype of actions. Haskell's do expressions provide a convenient syntax for writing monadic expressions.

Minimal complete definition: >>= and return.

Instances of Monad should satisfy the following laws:

 return a >>= k  ==  k a
 m >>= return  ==  m
 m >>= (\x -> k x >>= h)  ==  (m >>= k) >>= h

Instances of both Monad and Functor should additionally satisfy the law:

 fmap f xs  ==  xs >>= return . f

The instances of Monad for lists, Maybe and IO defined in the Prelude satisfy these laws.

Methods

(>>=) :: m a -> (a -> m b) -> m b

Sequentially compose two actions, passing any value produced by the first as an argument to the second.

(>>) :: m a -> m b -> m b

Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.

return :: a -> m a

Inject a value into the monadic type.

fail :: String -> m a

Fail with a message. This operation is not part of the mathematical definition of a monad, but is invoked on pattern-match failure in a do expression.

Instances

Monad [] 
Monad IO 
Monad Q 
Monad Maybe 
Monad ParseResult 
Monad Rose 
Monad Gen 
Monad P 
Monad STM 
Monad ReadPrec 
Monad ReadP 
Monad PutM 
Monad Get 
Monad Id 
Monad Tree 
Monad Seq 
Monad DList 
Monad TM 
Monad BcM 
Monad Assembler 
Monad TE 
Monad SimpleUniqueMonad 
Monad Ghc 
Monad P 
Monad Identity 
Monad PprM 
Monad BufferM 
Monad EditorM 
Monad YiM 
Monad ControlM 
Monad Box 
Monad Id 
Monad Vector 
Monad ConfigM 
Monad Ghc 
Monad ((->) r) 
Monad (Either e) 
Monad (P s) 
Monad (ST s) 
Monad (ST s) 
ArrowApply a => Monad (ArrowMonad a) 
Monad (State s) 
Monad m => Monad (UniqueMonadT m) 
Monad m => Monad (InfiniteFuelMonad m) 
Monad m => Monad (CheckingFuelMonad m) 
Monad (RegM freeRegs)

The RegM Monad

Monad m => Monad (GhcT m) 
Monad m => Monad (GhcT m) 
Monad m => Monad (InterpreterT m) 
Monad m => Monad (ListT m) 
Monad (Parser s) 
Monad m => Monad (MaybeT m) 
Monad m => Monad (IdentityT m) 
Monad m => Monad (MTLAdapter m) 
Monad (Parser r s) 
Monad (ContT r m) 
(Monad m, Error e) => Monad (ErrorT e m) 
Monad m => Monad (ReaderT r m) 
Monad m => Monad (StateT s m) 
Monad m => Monad (StateT s m) 
(Monoid w, Monad m) => Monad (WriterT w m) 
(Monoid w, Monad m) => Monad (WriterT w m) 
Monad (I event w) 
Monad (ParsecT s u m) 
(Monoid w, Monad m) => Monad (RWST r w s m) 
(Monoid w, Monad m) => Monad (RWST r w s m) 

class Num a where

Basic numeric class.

Minimal complete definition: all except negate or (-)

Methods

(+) :: a -> a -> a

(*) :: a -> a -> a

(-) :: a -> a -> a

negate :: a -> a

Unary negation.

abs :: a -> a

Absolute value.

signum :: a -> a

Sign of a number. The functions abs and signum should satisfy the law:

 abs x * signum x == x

For real numbers, the signum is either -1 (negative), 0 (zero) or 1 (positive).

fromInteger :: Integer -> a

Conversion from an Integer. An integer literal represents the application of the function fromInteger to the appropriate value of type Integer, so such literals have type (Num a) => a.

class Eq a => Ord a where

The Ord class is used for totally ordered datatypes.

Instances of Ord can be derived for any user-defined datatype whose constituent types are in Ord. The declared order of the constructors in the data declaration determines the ordering in derived Ord instances. The Ordering datatype allows a single comparison to determine the precise ordering of two objects.

Minimal complete definition: either compare or <=. Using compare can be more efficient for complex types.

Methods

compare :: a -> a -> Ordering

(<) :: a -> a -> Bool

(>=) :: a -> a -> Bool

(>) :: a -> a -> Bool

(<=) :: a -> a -> Bool

max :: a -> a -> a

min :: a -> a -> a

Instances

Ord Bool 
Ord Char 
Ord Double 
Ord Float 
Ord Int 
Ord Int8 
Ord Int16 
Ord Int32 
Ord Int64 
Ord Integer 
Ord Ordering 
Ord Word 
Ord Word8 
Ord Word16 
Ord Word32 
Ord Word64 
Ord Name 
Ord () 
Ord RepoKind 
Ord RepoType 
Ord FlagName 
Ord CompilerFlavor 
Ord CompilerId 
Ord PackageName 
Ord PackageIdentifier 
Ord InstalledPackageId 
Ord LowerBound 
Ord UpperBound 
Ord ModuleName 
Ord Version 
Ord DL 
Ord CDev 
Ord CIno 
Ord CMode 
Ord COff 
Ord CPid 
Ord CSsize 
Ord CGid 
Ord CNlink 
Ord CUid 
Ord CCc 
Ord CSpeed 
Ord CTcflag 
Ord CRLim 
Ord Fd 
Ord ThreadId 
Ord BlockReason 
Ord ThreadStatus 
Ord AsyncException 
Ord ArrayException 
Ord ExitCode 
Ord BufferMode 
Ord Newline 
Ord NewlineMode 
Ord All 
Ord Any 
Ord Arity 
Ord Fixity 
Ord Associativity 
Ord TypeRepKey 
Ord GeneralCategory 
Ord CChar 
Ord CSChar 
Ord CUChar 
Ord CShort 
Ord CUShort 
Ord CInt 
Ord CUInt 
Ord CLong 
Ord CULong 
Ord CLLong 
Ord CULLong 
Ord CFloat 
Ord CDouble 
Ord CPtrdiff 
Ord CSize 
Ord CWchar 
Ord CSigAtomic 
Ord CClock 
Ord CTime 
Ord CUSeconds 
Ord CSUSeconds 
Ord CIntPtr 
Ord CUIntPtr 
Ord CIntMax 
Ord CUIntMax 
Ord SeekMode 
Ord IOMode 
Ord Fingerprint 
Ord ArithException 
Ord TypeRep 
Ord TyCon 
Ord ByteString 
Ord ByteString 
Ord IntSet 
Ord RequiredInstance 
Ord NameSpace 
Ord NameFlavour 
Ord OccName 
Ord PkgName 
Ord ModName 
Ord GuardedAlt 
Ord GuardedAlts 
Ord Alt 
Ord FieldUpdate 
Ord QualStmt 
Ord Stmt 
Ord PatField 
Ord RPat 
Ord RPatOp 
Ord PXAttr 
Ord Pat 
Ord WarningText 
Ord RuleVar 
Ord Rule 
Ord Activation 
Ord ModulePragma 
Ord CallConv 
Ord Safety 
Ord Splice 
Ord Bracket 
Ord XAttr 
Ord XName 
Ord Exp 
Ord Literal 
Ord Asst 
Ord FunDep 
Ord Kind 
Ord TyVarBind 
Ord Type 
Ord GuardedRhs 
Ord Rhs 
Ord BangType 
Ord InstDecl 
Ord ClassDecl 
Ord GadtDecl 
Ord ConDecl 
Ord QualConDecl 
Ord Match 
Ord IPBind 
Ord Binds 
Ord DataOrNew 
Ord Annotation 
Ord Decl 
Ord Assoc 
Ord ImportSpec 
Ord ImportDecl 
Ord ExportSpec 
Ord Module 
Ord CName 
Ord Op 
Ord QOp 
Ord IPName 
Ord Name 
Ord QName 
Ord SpecialCon 
Ord ModuleName 
Ord Permissions 
Ord Discr 
Ord TyLit 
Ord Prec 
Ord UniqueSet 
Ord LabelSet 
Ord Label 
Ord Loc 
Ord AltCon 
Ord Var 
Ord Unique 
Ord TyThing 
Ord ChangeFlag 
Ord FontFace 
Ord FontFamily 
Ord Font 
Ord PangoDirection 
Ord PangoContext 
Ord FontMap 
Ord AtkObject 
Ord Colormap 
Ord Visual 
Ord Device 
Ord TipsQuery 
Ord Item 
Ord ListItem 
Ord InputDialog 
Ord CList 
Ord CTree 
Ord List 
Ord Preview 
Ord ItemFactory 
Ord CellLayout 
Ord TreeStore 
Ord ListStore 
Ord AccelGroup 
Ord AccelMap 
Ord Accessible 
Ord Keymap 
Ord DisplayManager 
Ord AppLaunchContext 
Ord PrintSettings 
Ord PrintOperation 
Ord PrintOperationPreview 
Ord PageSetup 
Ord PrintContext 
Ord RecentChooser 
Ord RecentManager 
Ord Drawable 
Ord DrawWindow 
Ord Pixmap 
Ord Screen 
Ord Display 
Ord Settings 
Ord TextBuffer 
Ord TextTag 
Ord TextTagTable 
Ord Style 
Ord RcStyle 
Ord DragContext 
Ord Pixbuf 
Ord PixbufAnimation 
Ord PixbufSimpleAnim 
Ord PixbufAnimationIter 
Ord TextChildAnchor 
Ord TextMark 
Ord Object 
Ord RecentFilter 
Ord Widget 
Ord HSV 
Ord Misc 
Ord Label 
Ord AccelLabel 
Ord Arrow 
Ord Image 
Ord Container 
Ord ToolPalette 
Ord ToolItemGroup 
Ord Bin 
Ord Alignment 
Ord Frame 
Ord AspectFrame 
Ord Button 
Ord ScaleButton 
Ord VolumeButton 
Ord LinkButton 
Ord ToggleButton 
Ord CheckButton 
Ord RadioButton 
Ord ColorButton 
Ord FontButton 
Ord OptionMenu 
Ord MenuItem 
Ord CheckMenuItem 
Ord RadioMenuItem 
Ord TearoffMenuItem 
Ord ImageMenuItem 
Ord SeparatorMenuItem 
Ord Window 
Ord Assistant 
Ord OffscreenWindow 
Ord Dialog 
Ord AboutDialog 
Ord ColorSelectionDialog 
Ord FileSelection 
Ord FileChooserDialog 
Ord FontSelectionDialog 
Ord MessageDialog 
Ord Plug 
Ord EventBox 
Ord HandleBox 
Ord ScrolledWindow 
Ord Viewport 
Ord Expander 
Ord ComboBox 
Ord ComboBoxEntry 
Ord ToolItem 
Ord ToolButton 
Ord MenuToolButton 
Ord ToggleToolButton 
Ord RadioToolButton 
Ord SeparatorToolItem 
Ord Box 
Ord ButtonBox 
Ord HButtonBox 
Ord VButtonBox 
Ord VBox 
Ord RecentChooserWidget 
Ord ColorSelection 
Ord FontSelection 
Ord FileChooserWidget 
Ord HBox 
Ord InfoBar 
Ord Combo 
Ord FileChooserButton 
Ord Statusbar 
Ord Fixed 
Ord Paned 
Ord HPaned 
Ord VPaned 
Ord IconView 
Ord Layout 
Ord MenuShell 
Ord Menu 
Ord RecentChooserMenu 
Ord MenuBar 
Ord Notebook 
Ord Socket 
Ord Table 
Ord TextView 
Ord Toolbar 
Ord TreeView 
Ord Calendar 
Ord CellView 
Ord DrawingArea 
Ord Spinner 
Ord Entry 
Ord SpinButton 
Ord Ruler 
Ord HRuler 
Ord VRuler 
Ord Range 
Ord Scale 
Ord HScale 
Ord VScale 
Ord Scrollbar 
Ord HScrollbar 
Ord VScrollbar 
Ord Separator 
Ord HSeparator 
Ord VSeparator 
Ord Invisible 
Ord ProgressBar 
Ord Adjustment 
Ord IMContext 
Ord IMMulticontext 
Ord IMContextSimple 
Ord Tooltips 
Ord TreeViewColumn 
Ord CellRenderer 
Ord CellRendererSpinner 
Ord CellRendererPixbuf 
Ord CellRendererText 
Ord CellRendererAccel 
Ord CellRendererSpin 
Ord CellRendererCombo 
Ord CellRendererToggle 
Ord CellRendererProgress 
Ord FileFilter 
Ord Builder 
Ord TreeSortable 
Ord Tooltip 
Ord StatusIcon 
Ord TreeSelection 
Ord TreeModel 
Ord TreeModelSort 
Ord TreeModelFilter 
Ord IconFactory 
Ord IconTheme 
Ord SizeGroup 
Ord Clipboard 
Ord EntryCompletion 
Ord EntryBuffer 
Ord Action 
Ord RecentAction 
Ord ToggleAction 
Ord RadioAction 
Ord ActionGroup 
Ord UIManager 
Ord WindowGroup 
Ord CellEditable 
Ord Editable 
Ord FileChooser 
Ord GC 
Ord Modifier 
Ord TimeLocale 
Ord Message 
Ord SourcePos 
Ord PatternSetCharacterClass 
Ord PatternSetCollatingElement 
Ord PatternSetEquivalenceClass 
Ord DoPa 
Ord WhichTest 
Ord LocalTime 
Ord TimeOfDay 
Ord TimeZone 
Ord UTCTime 
Ord NominalDiffTime 
Ord Day 
Ord UniversalTime 
Ord DiffTime 
Ord Key 
Ord Modifier 
Ord Button 
Ord Event 
Ord Text 
Ord Text 
Ord Event 
Ord Key 
Ord Modifier 
Ord PangoLayoutRaw 
Ord FontSet 
Ord Color 
Ord Attributes 
Ord Direction 
Ord WindowRef 
Ord Size 
Ord Point 
Ord BufferRef 
Ord Mark 
Ord Posn 
Ord Token 
Ord MarkValue 
Ord Overlay 
Ord OvlLayer 
Ord QueuedUpdate 
Ord MarkInfo 
Ord a => Ord [a] 
Integral a => Ord (Ratio a) 
Ord (Ptr a) 
Ord (FunPtr a) 
Ord a => Ord (Maybe a) 
Ord (ForeignPtr a) 
Ord (Fixed a) 
Ord a => Ord (Dual a) 
Ord a => Ord (Sum a) 
Ord a => Ord (Product a) 
Ord a => Ord (First a) 
Ord a => Ord (Last a) 
Ord a => Ord (Down a) 
Ord a => Ord (Seq a) 
Ord a => Ord (ViewL a) 
Ord a => Ord (ViewR a) 
Ord a => Ord (IntMap a) 
Ord a => Ord (Set a) 
Ord v => Ord (UniqueMap v) 
Ord v => Ord (LabelMap v) 
Ord id => Ord (Tickish id) 
Ord a => Ord (Vector a) 
(Ord a, Ord b) => Ord (Either a b) 
(Ord a, Ord b) => Ord (a, b) 
(Ix ix, Ord e, IArray UArray e) => Ord (UArray ix e) 
(Ix i, Ord e) => Ord (Array i e) 
(Ord k, Ord v) => Ord (Map k v) 
(Ord a, Ord (s a)) => Ord (ViewL s a) 
(Ord a, Ord (s a)) => Ord (ViewR s a) 
Ord a => Ord (FingerTree v a) 
Ord a => Ord (Stream Id a) 
(Ord a, Ord b, Ord c) => Ord (a, b, c) 
(Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) 
(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 

class Read a where

Parsing of Strings, producing values.

Minimal complete definition: readsPrec (or, for GHC only, readPrec)

Derived instances of Read make the following assumptions, which derived instances of Show obey:

  • If the constructor is defined to be an infix operator, then the derived Read instance will parse only infix applications of the constructor (not the prefix form).
  • Associativity is not used to reduce the occurrence of parentheses, although precedence may be.
  • If the constructor is defined using record syntax, the derived Read will parse only the record-syntax form, and furthermore, the fields must be given in the same order as the original declaration.
  • The derived Read instance allows arbitrary Haskell whitespace between tokens of the input string. Extra parentheses are also allowed.

For example, given the declarations

 infixr 5 :^:
 data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of Read in Haskell 98 is equivalent to

 instance (Read a) => Read (Tree a) where

         readsPrec d r =  readParen (d > app_prec)
                          (\r -> [(Leaf m,t) |
                                  ("Leaf",s) <- lex r,
                                  (m,t) <- readsPrec (app_prec+1) s]) r

                       ++ readParen (d > up_prec)
                          (\r -> [(u:^:v,w) |
                                  (u,s) <- readsPrec (up_prec+1) r,
                                  (":^:",t) <- lex s,
                                  (v,w) <- readsPrec (up_prec+1) t]) r

           where app_prec = 10
                 up_prec = 5

Note that right-associativity of :^: is unused.

The derived instance in GHC is equivalent to

 instance (Read a) => Read (Tree a) where

         readPrec = parens $ (prec app_prec $ do
                                  Ident "Leaf" <- lexP
                                  m <- step readPrec
                                  return (Leaf m))

                      +++ (prec up_prec $ do
                                  u <- step readPrec
                                  Symbol ":^:" <- lexP
                                  v <- step readPrec
                                  return (u :^: v))

           where app_prec = 10
                 up_prec = 5

         readListPrec = readListPrecDefault

Methods

readsPrec

Arguments

:: Int

the operator precedence of the enclosing context (a number from 0 to 11). Function application has precedence 10.

-> ReadS a 

attempts to parse a value from the front of the string, returning a list of (parsed value, remaining string) pairs. If there is no successful parse, the returned list is empty.

Derived instances of Read and Show satisfy the following:

That is, readsPrec parses the string produced by showsPrec, and delivers the value that showsPrec started with.

readList :: ReadS [a]

The method readList is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined Read instance of the Char type, where values of type String should be are expected to use double quotes, rather than square brackets.

Instances

Read Bool 
Read Char 
Read Double 
Read Float 
Read Int 
Read Int8 
Read Int16 
Read Int32 
Read Int64 
Read Integer 
Read Ordering 
Read Word 
Read Word8 
Read Word16 
Read Word32 
Read Word64 
Read () 
Read PackageDescription 
Read BuildType 
Read Library 
Read Executable 
Read TestSuite 
Read TestSuiteInterface 
Read TestType 
Read Benchmark 
Read BenchmarkInterface 
Read BenchmarkType 
Read BuildInfo 
Read SourceRepo 
Read RepoKind 
Read RepoType 
Read FlagName 
Read CompilerFlavor 
Read CompilerId 
Read PackageName 
Read PackageIdentifier 
Read InstalledPackageId 
Read Dependency 
Read License 
Read VersionRange 
Read Language 
Read Extension 
Read KnownExtension 
Read ModuleName 
Read Version 
Read CDev 
Read CIno 
Read CMode 
Read COff 
Read CPid 
Read CSsize 
Read CGid 
Read CNlink 
Read CUid 
Read CCc 
Read CSpeed 
Read CTcflag 
Read CRLim 
Read Fd 
Read ExitCode 
Read BufferMode 
Read Newline 
Read NewlineMode 
Read All 
Read Any 
Read Arity 
Read Fixity 
Read Associativity 
Read GeneralCategory 
Read CChar 
Read CSChar 
Read CUChar 
Read CShort 
Read CUShort 
Read CInt 
Read CUInt 
Read CLong 
Read CULong 
Read CLLong 
Read CULLong 
Read CFloat 
Read CDouble 
Read CPtrdiff 
Read CSize 
Read CWchar 
Read CSigAtomic 
Read CClock 
Read CTime 
Read CUSeconds 
Read CSUSeconds 
Read CIntPtr 
Read CUIntPtr 
Read CIntMax 
Read CUIntMax 
Read SeekMode 
Read IOMode 
Read Lexeme 
Read ByteString 
Read ByteString 
Read IntSet 
Read Permissions 
Read ModuleElem 
Read Extension 
Read StdGen 
Read CompOption 
Read ExecOption 
Read LocalTime 
Read ZonedTime 
Read TimeOfDay 
Read TimeZone 
Read UTCTime 
Read Day 
Read GroupEntry 
Read UserEntry 
Read Text 
Read Text 
Read a => Read [a] 
(Integral a, Read a) => Read (Ratio a) 
Read a => Read (Maybe a) 
HasResolution a => Read (Fixed a) 
Read a => Read (Dual a) 
Read a => Read (Sum a) 
Read a => Read (Product a) 
Read a => Read (First a) 
Read a => Read (Last a) 
Read a => Read (Tree a) 
Read a => Read (Seq a) 
Read a => Read (ViewL a) 
Read a => Read (ViewR a) 
Read e => Read (IntMap e) 
(Read a, Ord a) => Read (Set a) 
Read a => Read (Vector a) 
(Read a, Read b) => Read (Either a b) 
(Read a, Read b) => Read (a, b) 
(Ix a, Read a, Read b) => Read (Array a b) 
(Ord k, Read k, Read e) => Read (Map k e) 
(Read a, Read (s a)) => Read (ViewL s a) 
(Read a, Read (s a)) => Read (ViewR s a) 
(Read a, Read b, Read c) => Read (a, b, c) 
(Read a, Read b, Read c, Read d) => Read (a, b, c, d) 
(Read a, Read b, Read c, Read d, Read e) => Read (a, b, c, d, e) 
(Read a, Read b, Read c, Read d, Read e, Read f) => Read (a, b, c, d, e, f) 
(Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read (a, b, c, d, e, f, g) 
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h) => Read (a, b, c, d, e, f, g, h) 
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i) => Read (a, b, c, d, e, f, g, h, i) 
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j) => Read (a, b, c, d, e, f, g, h, i, j) 
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k) => Read (a, b, c, d, e, f, g, h, i, j, k) 
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l) => Read (a, b, c, d, e, f, g, h, i, j, k, l) 
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m) 
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n, Read o) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 

class (Real a, Fractional a) => RealFrac a where

Extracting components of fractions.

Minimal complete definition: properFraction

Methods

properFraction :: Integral b => a -> (b, a)

The function properFraction takes a real fractional number x and returns a pair (n,f) such that x = n+f, and:

  • n is an integral number with the same sign as x; and
  • f is a fraction with the same type and sign as x, and with absolute value less than 1.

The default definitions of the ceiling, floor, truncate and round functions are in terms of properFraction.

truncate :: Integral b => a -> b

truncate x returns the integer nearest x between zero and x

round :: Integral b => a -> b

round x returns the nearest integer to x; the even integer if x is equidistant between two integers

ceiling :: Integral b => a -> b

ceiling x returns the least integer not less than x

floor :: Integral b => a -> b

floor x returns the greatest integer not greater than x

newtype ReaderT r m a

Constructors

ReaderT 

Fields

runReaderT :: r -> m a
 

Instances

MonadError e m => MonadError e (ReaderT r m) 
Monad m => MonadReader r (ReaderT r m) 
MonadState s m => MonadState s (ReaderT r m) 
MonadWriter w m => MonadWriter w (ReaderT r m) 
MonadTrans (ReaderT r) 
Monad m => Monad (ReaderT r m) 
Functor m => Functor (ReaderT r m) 
MonadFix m => MonadFix (ReaderT r m) 
MonadPlus m => MonadPlus (ReaderT r m) 
Applicative m => Applicative (ReaderT r m) 
Alternative m => Alternative (ReaderT r m) 
MonadIO m => MonadIO (ReaderT r m) 
MonadCatchIO m => MonadCatchIO (ReaderT r m) 

class SemiNum absolute relative | absolute -> relative whereSource

Methods

(+~) :: absolute -> relative -> absoluteSource

(-~) :: absolute -> relative -> absoluteSource

(~-) :: absolute -> absolute -> relativeSource

Instances

type String = [Char]

A String is a list of characters. String constants in Haskell are values of type String.

class Typeable a

The class Typeable allows a concrete representation of a type to be calculated.

Instances

Typeable Bool 
Typeable Char 
Typeable Double 
Typeable Float 
Typeable Int 
Typeable Int8 
Typeable Int16 
Typeable Int32 
Typeable Int64 
Typeable Integer 
Typeable Ordering 
Typeable RealWorld 
Typeable Word 
Typeable Word8 
Typeable Word16 
Typeable Word32 
Typeable Word64 
Typeable Exp 
Typeable Match 
Typeable Clause 
Typeable Pat 
Typeable Type 
Typeable Dec 
Typeable Name 
Typeable FunDep 
Typeable Pred 
Typeable TyVarBndr 
Typeable () 
Typeable IOException 
Typeable Version 
Typeable Handle 
Typeable FD 
Typeable Handle__ 
Typeable E0 
Typeable E1 
Typeable E2 
Typeable E3 
Typeable E6 
Typeable E9 
Typeable E12 
Typeable SpecConstrAnnotation 
Typeable DataType 
Typeable CDev 
Typeable CIno 
Typeable CMode 
Typeable COff 
Typeable CPid 
Typeable CSsize 
Typeable CGid 
Typeable CNlink 
Typeable CUid 
Typeable CCc 
Typeable CSpeed 
Typeable CTcflag 
Typeable CRLim 
Typeable Fd 
Typeable PatternMatchFail 
Typeable RecSelError 
Typeable RecConError 
Typeable RecUpdError 
Typeable NoMethodError 
Typeable NonTermination 
Typeable NestedAtomically 
Typeable ThreadId 
Typeable BlockedIndefinitelyOnMVar 
Typeable BlockedIndefinitelyOnSTM 
Typeable Deadlock 
Typeable AssertionFailed 
Typeable AsyncException 
Typeable ArrayException 
Typeable ExitCode 
Typeable Dynamic 
Typeable CChar 
Typeable CSChar 
Typeable CUChar 
Typeable CShort 
Typeable CUShort 
Typeable CInt 
Typeable CUInt 
Typeable CLong 
Typeable CULong 
Typeable CLLong 
Typeable CULLong 
Typeable CFloat 
Typeable CDouble 
Typeable CPtrdiff 
Typeable CSize 
Typeable CWchar 
Typeable CSigAtomic 
Typeable CClock 
Typeable CTime 
Typeable CUSeconds 
Typeable CSUSeconds 
Typeable CIntPtr 
Typeable CUIntPtr 
Typeable CIntMax 
Typeable CUIntMax 
Typeable SomeException 
Typeable ErrorCall 
Typeable ArithException 
Typeable TypeRep 
Typeable TyCon 
Typeable ByteString 
Typeable ByteString 
Typeable ConcreteTypeRep 
Typeable IntSet 
Typeable TyLit 
Typeable Con 
Typeable Strict 
Typeable RuleBndr 
Typeable Phases 
Typeable RuleMatch 
Typeable Inline 
Typeable Pragma 
Typeable Safety 
Typeable Callconv 
Typeable Foreign 
Typeable FamFlavour 
Typeable Range 
Typeable Stmt 
Typeable Guard 
Typeable Body 
Typeable FixityDirection 
Typeable Fixity 
Typeable Info 
Typeable NameSpace 
Typeable NameFlavour 
Typeable OccName 
Typeable PkgName 
Typeable ModName 
Typeable GuardedAlt 
Typeable GuardedAlts 
Typeable Alt 
Typeable FieldUpdate 
Typeable QualStmt 
Typeable Stmt 
Typeable PatField 
Typeable RPat 
Typeable RPatOp 
Typeable PXAttr 
Typeable Pat 
Typeable WarningText 
Typeable RuleVar 
Typeable Rule 
Typeable Activation 
Typeable ModulePragma 
Typeable CallConv 
Typeable Safety 
Typeable Splice 
Typeable Bracket 
Typeable XAttr 
Typeable XName 
Typeable Exp 
Typeable Literal 
Typeable Asst 
Typeable FunDep 
Typeable Kind 
Typeable TyVarBind 
Typeable Type 
Typeable GuardedRhs 
Typeable Rhs 
Typeable BangType 
Typeable InstDecl 
Typeable ClassDecl 
Typeable GadtDecl 
Typeable ConDecl 
Typeable QualConDecl 
Typeable Match 
Typeable IPBind 
Typeable Binds 
Typeable DataOrNew 
Typeable Annotation 
Typeable Decl 
Typeable Assoc 
Typeable ImportSpec 
Typeable ImportDecl 
Typeable ExportSpec 
Typeable Module 
Typeable CName 
Typeable Op 
Typeable QOp 
Typeable IPName 
Typeable Name 
Typeable QName 
Typeable SpecialCon 
Typeable ModuleName 
Typeable Lit 
Typeable TyLit 
Typeable AltCon 
Typeable Coercion 
Typeable Var 
Typeable Type 
Typeable GError 
Typeable MultipleInstancesNotAllowed 
Typeable InterpreterError 
Typeable SourcePos 
Typeable LocalTime 
Typeable ZonedTime 
Typeable TimeOfDay 
Typeable TimeZone 
Typeable UTCTime 
Typeable NominalDiffTime 
Typeable Day 
Typeable UniversalTime 
Typeable DiffTime 
Typeable Handler 
Typeable Text 
Typeable Text 
Typeable Editor 
Typeable AnyLayoutManager 
Typeable DynamicValues 
Typeable Action 
Typeable Direction 
Typeable WindowRef 
Typeable Point 
Typeable BufferRef 
Typeable Mark 
Typeable Region 
Typeable Window 
Typeable Tab 
Typeable MarkValue 
Typeable Update 
Typeable AnyMode 
Typeable IndentSettings 
Typeable FBuffer 
Typeable TextUnit 
Typeable RegionStyle 
Typeable TempBufferNameHint 
Typeable History 
Typeable TagTable 
Typeable VimTagStack 
Typeable Yi 
Typeable ArticleDB 
Typeable VimState 
Typeable VimMode 
Typeable RepeatableAction 
Typeable CommandArguments 
Typeable FilePatternTag 
Typeable RegexTag 
Typeable CabalBuffer 
Typeable Evaluator 
Typeable DependentMarks 
Typeable BufferMarks 
(Typeable1 s, Typeable a) => Typeable (s a)

One Typeable instance for all Typeable1 instances

commonPrefix :: Eq a => [[a]] -> [a]Source

Return the longest common prefix of a set of lists.

 P(xs) === all (isPrefixOf (commonPrefix xs)) xs
 length s > length (commonPrefix xs) --> not (all (isPrefixOf s) xs)

discard :: Functor f => f a -> f ()Source

dummyPut :: a -> PutSource

Write nothing. Use with dummyGet

dummyGet :: Initializable a => Get aSource

Read nothing, and return initial. Use with dummyPut.

every :: Traversable t => Accessor whole part -> Accessor (t whole) (t part)Source

Lift an accessor to a traversable structure. (This can be seen as a generalization of fmap)

findPL :: (a -> Bool) -> [a] -> Maybe (PointedList a)Source

Finds the first element satisfying the predicate, and returns a zipper pointing at it.

fromIntegral :: (Integral a, Num b) => a -> b

general coercion from integral types

fst :: (a, b) -> a

Extract the first component of a pair.

fst3 :: (a, b, c) -> aSource

groupBy' :: (a -> a -> Bool) -> [a] -> [[a]]Source

Alternative to groupBy.

 groupBy' (\a b -> abs (a - b) <= 1) [1,2,3] = [[1,2,3]]

whereas

 groupBy (\a b -> abs (a - b) <= 1) [1,2,3] = [[1,2],[3]]

TODO: Check in ghc 6.12 release if groupBy == groupBy'.

list :: b -> (a -> [a] -> b) -> [a] -> bSource

head :: [a] -> a

Extract the first element of a list, which must be non-empty.

init :: [a] -> [a]

Return all the elements of a list except the last one. The list must be non-empty.

io :: MonadIO m => IO a -> m aSource

last :: [a] -> a

Extract the last element of a list, which must be finite and non-empty.

lookup :: Eq a => a -> [(a, b)] -> Maybe b

lookup key assocs looks up a key in an association list.

mapAdjust' :: Ord k => (a -> a) -> k -> Map k a -> Map k aSource

As Map.adjust, but the combining function is applied strictly.

mapAlter' :: Ord k => (Maybe a -> Maybe a) -> k -> Map k a -> Map k aSource

As Map.alter, but the newly inserted element is forced with the map.

mapFromFoldable :: (Foldable t, Ord k) => t (k, a) -> Map k aSource

Generalisation of fromList to arbitrary foldables.

putA :: MonadState r m => T r a -> a -> m ()Source

getA :: MonadState r m => T r a -> m aSource

modA :: MonadState r m => T r a -> (a -> a) -> m ()Source

module Data.Bool

module Data.Int

data Rope Source

Instances

Conversions to Rope

Conversions from Rope

List-like functions

length :: Rope -> IntSource

Get the length of the string. (This information cached, so O(1) amortized runtime.)

countNewLines :: Rope -> IntSource

Count the number of newlines in the strings. (This information cached, so O(1) amortized runtime.)

splitAt :: Int -> Rope -> (Rope, Rope)Source

Split the string at the specified position.

splitAtLine :: Int -> Rope -> (Rope, Rope)Source

Split before the specified line. Lines are indexed from 0.

append :: Rope -> Rope -> RopeSource

Append two strings by merging the two finger trees.

IO

Low level functions

splitAtChunkBefore :: Int -> Rope -> (Rope, Rope)Source

Split the rope on a chunk, so that the desired position lies within the first chunk of the second rope.

module Text.Show

module Yi.Debug

module Yi.Monad

nubSet :: Ord a => [a] -> [a]Source

As nub, but with O(n*log(n)) behaviour.

null :: [a] -> Bool

Test whether a list is empty.

print :: Show a => a -> IO ()

The print function outputs a value of any printable type to the standard output device. Printable types are those that are instances of class Show; print converts values to strings for output using the show operation and adds a newline.

For example, a program to print the first 20 integers and their powers of 2 could be written as:

 main = print ([(n, 2^n) | n <- [0..19]])

putStrLn :: String -> IO ()

The same as putStr, but adds a newline character.

replicate :: Int -> a -> [a]

replicate n x is a list of length n with x the value of every element. It is an instance of the more general genericReplicate, in which n may be of any integral type.

read :: Read a => String -> a

The read function reads input from a string, which must be completely consumed by the input process.

seq :: a -> b -> b

Evaluates its first argument to head normal form, and then returns its second argument as the result.

singleton :: a -> [a]Source

snd :: (a, b) -> b

Extract the second component of a pair.

snd3 :: (a, b, c) -> bSource

swapFocus :: (PointedList a -> PointedList a) -> PointedList a -> PointedList aSource

Given a function which moves the focus from index A to index B, return a function which swaps the elements at indexes A and B and then moves the focus. See Yi.Editor.swapWinWithFirstE for an example.

tail :: [a] -> [a]

Extract the elements after the head of a list, which must be non-empty.

trd3 :: (a, b, c) -> cSource

undefined :: a

A special case of error. It is expected that compilers will recognize this and insert error messages which are more appropriate to the context in which undefined appears.

unlines :: [String] -> String

unlines is an inverse operation to lines. It joins lines, after appending a terminating newline to each.

when :: Monad m => Bool -> m () -> m ()

Conditional execution of monadic expressions. For example,

       when debug (putStr "Debugging\n")

will output the string Debugging\n if the Boolean value debug is True, and otherwise do nothing.

writeFile :: FilePath -> String -> IO ()

The computation writeFile file str function writes the string str, to the file file.