idris-1.3.4: Functional Programming Language with Dependent Types

License | BSD3
Maintainer | The Idris Community.
Safe Haskell | Safe-Inferred
Language | Haskell2010

Idris.Colours

Description

Synopsis

- data IdrisColour = IdrisColour {
  - colour :: Maybe Color
  - vivid :: Bool
  - underline :: Bool
  - bold :: Bool
  - italic :: Bool
  }
- data ColourTheme = ColourTheme {
  - keywordColour :: IdrisColour
  - boundVarColour :: IdrisColour
  - implicitColour :: IdrisColour
  - functionColour :: IdrisColour
  - typeColour :: IdrisColour
  - dataColour :: IdrisColour
  - promptColour :: IdrisColour
  - postulateColour :: IdrisColour
  }
- defaultTheme :: ColourTheme
- colouriseKwd :: ColourTheme -> String -> String
- colouriseBound :: ColourTheme -> String -> String
- colouriseImplicit :: ColourTheme -> String -> String
- colourisePostulate :: ColourTheme -> String -> String
- colouriseType :: ColourTheme -> String -> String
- colouriseFun :: ColourTheme -> String -> String
- colouriseData :: ColourTheme -> String -> String
- colouriseKeyword :: ColourTheme -> String -> String
- colourisePrompt :: ColourTheme -> String -> String
- colourise :: IdrisColour -> String -> String
- data ColourType
  - = KeywordColour
  - | BoundVarColour
  - | ImplicitColour
  - | FunctionColour
  - | TypeColour
  - | DataColour
  - | PromptColour
  - | PostulateColour
- hStartColourise :: Handle -> IdrisColour -> IO ()
- hEndColourise :: Handle -> IdrisColour -> IO ()

# Documentation

data IdrisColour #

Constructors

IdrisColour |

Fields

- colour :: Maybe Color
- vivid :: Bool
- underline :: Bool
- bold :: Bool
- italic :: Bool

#### Instances

Instances details

NFData IdrisColour # |
Instance details Defined in Idris.DeepSeq Methods rnf :: IdrisColour -> () #
Show IdrisColour # |
Instance details Defined in Idris.Colours Methods showsPrec :: Int -> IdrisColour -> ShowS # show :: IdrisColour -> String # showList :: [IdrisColour] -> ShowS #
Eq IdrisColour # |
Instance details Defined in Idris.Colours Methods (==) :: IdrisColour -> IdrisColour -> Bool # (/=) :: IdrisColour -> IdrisColour -> Bool #

data ColourTheme #

Constructors

ColourTheme |

Fields

- keywordColour :: IdrisColour
- boundVarColour :: IdrisColour
- implicitColour :: IdrisColour
- functionColour :: IdrisColour
- typeColour :: IdrisColour
- dataColour :: IdrisColour
- promptColour :: IdrisColour
- postulateColour :: IdrisColour

#### Instances

Instances details

NFData ColourTheme # |
Instance details Defined in Idris.DeepSeq Methods rnf :: ColourTheme -> () #
Generic ColourTheme # |

Instance details

Defined in Idris.Colours

Associated Types

type Rep ColourTheme |

Instance details

Defined in Idris.Colours

type Rep ColourTheme = D1 ('MetaData "ColourTheme" "Idris.Colours" "idris-1.3.4-CzetPXHz9szL2e7hoCyB4A" 'False) (C1 ('MetaCons "ColourTheme" 'PrefixI 'True) (((S1 ('MetaSel ('Just "keywordColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour) :*: S1 ('MetaSel ('Just "boundVarColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour)) :*: (S1 ('MetaSel ('Just "implicitColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour) :*: S1 ('MetaSel ('Just "functionColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour))) :*: ((S1 ('MetaSel ('Just "typeColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour) :*: S1 ('MetaSel ('Just "dataColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour)) :*: (S1 ('MetaSel ('Just "promptColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour) :*: S1 ('MetaSel ('Just "postulateColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour)))))

Methods

from :: ColourTheme -> Rep ColourTheme x #

to :: Rep ColourTheme x -> ColourTheme #

Show ColourTheme # |
Instance details Defined in Idris.Colours Methods showsPrec :: Int -> ColourTheme -> ShowS # show :: ColourTheme -> String # showList :: [ColourTheme] -> ShowS #
Eq ColourTheme # |
Instance details Defined in Idris.Colours Methods (==) :: ColourTheme -> ColourTheme -> Bool # (/=) :: ColourTheme -> ColourTheme -> Bool #
type Rep ColourTheme # |

Instance details

Defined in Idris.Colours

type Rep ColourTheme = D1 ('MetaData "ColourTheme" "Idris.Colours" "idris-1.3.4-CzetPXHz9szL2e7hoCyB4A" 'False) (C1 ('MetaCons "ColourTheme" 'PrefixI 'True) (((S1 ('MetaSel ('Just "keywordColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour) :*: S1 ('MetaSel ('Just "boundVarColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour)) :*: (S1 ('MetaSel ('Just "implicitColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour) :*: S1 ('MetaSel ('Just "functionColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour))) :*: ((S1 ('MetaSel ('Just "typeColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour) :*: S1 ('MetaSel ('Just "dataColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour)) :*: (S1 ('MetaSel ('Just "promptColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour) :*: S1 ('MetaSel ('Just "postulateColour") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IdrisColour)))))

defaultTheme :: ColourTheme #

Idris's default console colour theme

colouriseKwd :: ColourTheme -> String -> String #

colouriseBound :: ColourTheme -> String -> String #

colouriseImplicit :: ColourTheme -> String -> String #

colourisePostulate :: ColourTheme -> String -> String #

colouriseType :: ColourTheme -> String -> String #

colouriseFun :: ColourTheme -> String -> String #

colouriseData :: ColourTheme -> String -> String #

colouriseKeyword :: ColourTheme -> String -> String #

colourisePrompt :: ColourTheme -> String -> String #

colourise :: IdrisColour -> String -> String #

Set the colour of a string using POSIX escape codes

data ColourType #

Constructors

KeywordColour |
BoundVarColour |
ImplicitColour |
FunctionColour |
TypeColour |
DataColour |
PromptColour |
PostulateColour |

#### Instances

Instances details

Bounded ColourType # |
Instance details Defined in Idris.Colours Methods minBound :: ColourType # maxBound :: ColourType #
Enum ColourType # |

Instance details

Defined in Idris.Colours

Methods

succ :: ColourType -> ColourType #

pred :: ColourType -> ColourType #

toEnum :: Int -> ColourType #

fromEnum :: ColourType -> Int #

enumFrom :: ColourType -> [ColourType] #

enumFromThen :: ColourType -> ColourType -> [ColourType] #

enumFromTo :: ColourType -> ColourType -> [ColourType] #

enumFromThenTo :: ColourType -> ColourType -> ColourType -> [ColourType] #

Show ColourType # |
Instance details Defined in Idris.Colours Methods showsPrec :: Int -> ColourType -> ShowS # show :: ColourType -> String # showList :: [ColourType] -> ShowS #
Eq ColourType # |
Instance details Defined in Idris.Colours Methods (==) :: ColourType -> ColourType -> Bool # (/=) :: ColourType -> ColourType -> Bool #

hStartColourise :: Handle -> IdrisColour -> IO () #

Start a colour on a handle, to support colour output on Windows

hEndColourise :: Handle -> IdrisColour -> IO () #

End a colour region on a handle