Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Derive.TScore.T

Contents

Description

Shared types for TScore.

Synopsis

Documentation

newtype Time Source #

This is the default "beat".

Constructors

Time Rational 

Instances

Instances details
Enum Time Source # 
Instance details

Defined in Derive.TScore.T

Methods

succ :: Time -> Time #

pred :: Time -> Time #

toEnum :: Int -> Time #

fromEnum :: Time -> Int #

enumFrom :: Time -> [Time] #

enumFromThen :: Time -> Time -> [Time] #

enumFromTo :: Time -> Time -> [Time] #

enumFromThenTo :: Time -> Time -> Time -> [Time] #

Num Time Source # 
Instance details

Defined in Derive.TScore.T

Methods

(+) :: Time -> Time -> Time #

(-) :: Time -> Time -> Time #

(*) :: Time -> Time -> Time #

negate :: Time -> Time #

abs :: Time -> Time #

signum :: Time -> Time #

fromInteger :: Integer -> Time #

Fractional Time Source # 
Instance details

Defined in Derive.TScore.T

Methods

(/) :: Time -> Time -> Time #

recip :: Time -> Time #

fromRational :: Rational -> Time #

Real Time Source # 
Instance details

Defined in Derive.TScore.T

Methods

toRational :: Time -> Rational #

RealFrac Time Source # 
Instance details

Defined in Derive.TScore.T

Methods

properFraction :: Integral b => Time -> (b, Time) #

truncate :: Integral b => Time -> b #

round :: Integral b => Time -> b #

ceiling :: Integral b => Time -> b #

floor :: Integral b => Time -> b #

Show Time Source # 
Instance details

Defined in Derive.TScore.T

Eq Time Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Time -> Time -> Bool #

(/=) :: Time -> Time -> Bool #

Ord Time Source # 
Instance details

Defined in Derive.TScore.T

Methods

compare :: Time -> Time -> Ordering #

(<) :: Time -> Time -> Bool #

(<=) :: Time -> Time -> Bool #

(>) :: Time -> Time -> Bool #

(>=) :: Time -> Time -> Bool #

max :: Time -> Time -> Time #

min :: Time -> Time -> Time #

Pretty Time Source # 
Instance details

Defined in Derive.TScore.T

Pretty (Note CallText (Maybe Text) Time) Source #

This is the output from Check.check.

Instance details

Defined in Derive.TScore.Parse

Score

newtype Score Source #

Constructors

Score [(Pos, Toplevel)] 

Instances

Instances details
Show Score Source # 
Instance details

Defined in Derive.TScore.T

Eq Score Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Score -> Score -> Bool #

(/=) :: Score -> Score -> Bool #

data Toplevel Source #

Instances

Instances details
Show Toplevel Source # 
Instance details

Defined in Derive.TScore.T

Eq Toplevel Source # 
Instance details

Defined in Derive.TScore.T

data Block tracks Source #

call is a parameter, because SubBlock will later be resolved to CallText.

Constructors

Block 

Instances

Instances details
Show tracks => Show (Block tracks) Source # 
Instance details

Defined in Derive.TScore.T

Methods

showsPrec :: Int -> Block tracks -> ShowS #

show :: Block tracks -> String.String #

showList :: [Block tracks] -> ShowS #

Eq tracks => Eq (Block tracks) Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Block tracks -> Block tracks -> Bool #

(/=) :: Block tracks -> Block tracks -> Bool #

data WrappedTracks Source #

Constructors

WrappedTracks !Pos ![Tracks Call] 

Instances

Instances details
Show WrappedTracks Source # 
Instance details

Defined in Derive.TScore.T

Eq WrappedTracks Source # 
Instance details

Defined in Derive.TScore.T

newtype Tracks call Source #

Constructors

Tracks [Track call] 

Instances

Instances details
Show call => Show (Tracks call) Source # 
Instance details

Defined in Derive.TScore.T

Methods

showsPrec :: Int -> Tracks call -> ShowS #

show :: Tracks call -> String.String #

showList :: [Tracks call] -> ShowS #

Eq call => Eq (Tracks call) Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Tracks call -> Tracks call -> Bool #

(/=) :: Tracks call -> Tracks call -> Bool #

untracks :: Tracks call -> [Track call] Source #

data Track call Source #

Constructors

Track 

Fields

  • track_key :: !Text

    Some arbitrary symbols. This has no meaning except to make the track with its title unique on this block. This is so that tracks have an identity, and I can detect track moves, adds, and deletes.

  • track_title :: !Text

    The track title will include a > if the original syntax did, or be "" if the track has no title at all, which is only possible for the first one, e.g. [a] or [a > b]. This way unparse can emit the same abbreviated syntax.

  • track_directives :: ![Directive]
     
  • track_tokens :: ![Token call (NPitch Pitch) NDuration Duration]
     
  • track_pos :: !Pos
     

Instances

Instances details
Show call => Show (Track call) Source # 
Instance details

Defined in Derive.TScore.T

Methods

showsPrec :: Int -> Track call -> ShowS #

show :: Track call -> String.String #

showList :: [Track call] -> ShowS #

Eq call => Eq (Track call) Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Track call -> Track call -> Bool #

(/=) :: Track call -> Track call -> Bool #

data Directive Source #

Constructors

Directive !Pos !Text !(Maybe Text) 

Instances

Instances details
Show Directive Source # 
Instance details

Defined in Derive.TScore.T

Eq Directive Source # 
Instance details

Defined in Derive.TScore.T

data Token call pitch ndur rdur Source #

Constructors

TBarline !Pos !Barline

Higher count for larger divisions, e.g. anga vs. avartanam.

TNote !Pos !(Note call pitch ndur) 
TRest !Pos !(Rest rdur) 

Instances

Instances details
(Show call, Show pitch, Show ndur, Show rdur) => Show (Token call pitch ndur rdur) Source # 
Instance details

Defined in Derive.TScore.T

Methods

showsPrec :: Int -> Token call pitch ndur rdur -> ShowS #

show :: Token call pitch ndur rdur -> String.String #

showList :: [Token call pitch ndur rdur] -> ShowS #

(Eq call, Eq pitch, Eq ndur, Eq rdur) => Eq (Token call pitch ndur rdur) Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Token call pitch ndur rdur -> Token call pitch ndur rdur -> Bool #

(/=) :: Token call pitch ndur rdur -> Token call pitch ndur rdur -> Bool #

Pretty (Token CallText Pitch NDuration Duration) Source # 
Instance details

Defined in Derive.TScore.Parse

token_pos :: Token call pitch ndur rdur -> Pos Source #

token_name :: Token call pitch ndur rdur -> Text Source #

map_call :: (call1 -> call2) -> Token call1 pitch ndur rdur -> Token call2 pitch ndur rdur Source #

map_pitch :: Applicative m => (pitch1 -> m pitch2) -> Token call pitch1 ndur rdur -> m (Token call pitch2 ndur rdur) Source #

map_note_duration :: Applicative m => (dur1 -> m dur2) -> Token call pitch dur1 rdur -> m (Token call pitch dur2 rdur) Source #

map_note :: Applicative m => (Note call1 pitch1 ndur -> m (Note call2 pitch2 ndur)) -> Token call1 pitch1 ndur rdur -> m (Token call2 pitch2 ndur rdur) Source #

type Rank = Int Source #

Opposite from Ruler.Rank, higher numbers mean larger divisions.

data Barline Source #

Instances

Instances details
Show Barline Source # 
Instance details

Defined in Derive.TScore.T

Eq Barline Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Barline -> Barline -> Bool #

(/=) :: Barline -> Barline -> Bool #

Pretty Barline Source # 
Instance details

Defined in Derive.TScore.Parse

data Note call pitch dur Source #

Constructors

Note 

Fields

Instances

Instances details
(Show call, Show pitch, Show dur) => Show (Note call pitch dur) Source # 
Instance details

Defined in Derive.TScore.T

Methods

showsPrec :: Int -> Note call pitch dur -> ShowS #

show :: Note call pitch dur -> String.String #

showList :: [Note call pitch dur] -> ShowS #

(Eq call, Eq pitch, Eq dur) => Eq (Note call pitch dur) Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Note call pitch dur -> Note call pitch dur -> Bool #

(/=) :: Note call pitch dur -> Note call pitch dur -> Bool #

Pretty (Note CallText Pitch NDuration) Source # 
Instance details

Defined in Derive.TScore.Parse

Pretty (Note CallText (Maybe Text) Time) Source #

This is the output from Check.check.

Instance details

Defined in Derive.TScore.Parse

data Call Source #

Constructors

Call !CallText 
SubBlock !CallText ![Tracks Call]

A call can take multiple Tracks arguments, each one of which is a sub-block.

Instances

Instances details
String.IsString Call Source # 
Instance details

Defined in Derive.TScore.T

Show Call Source # 
Instance details

Defined in Derive.TScore.T

Eq Call Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Call -> Call -> Bool #

(/=) :: Call -> Call -> Bool #

Pretty Call Source # 
Instance details

Defined in Derive.TScore.Parse

type CallText = Text Source #

Tracklang expression. This goes into the event text.

newtype Rest dur Source #

Constructors

Rest dur 

Instances

Instances details
Show dur => Show (Rest dur) Source # 
Instance details

Defined in Derive.TScore.T

Methods

showsPrec :: Int -> Rest dur -> ShowS #

show :: Rest dur -> String.String #

showList :: [Rest dur] -> ShowS #

Eq dur => Eq (Rest dur) Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Rest dur -> Rest dur -> Bool #

(/=) :: Rest dur -> Rest dur -> Bool #

Pretty (Rest Duration) Source # 
Instance details

Defined in Derive.TScore.Parse

data NPitch pitch Source #

Constructors

CopyFrom 
NPitch !pitch 

Instances

Instances details
Show pitch => Show (NPitch pitch) Source # 
Instance details

Defined in Derive.TScore.T

Methods

showsPrec :: Int -> NPitch pitch -> ShowS #

show :: NPitch pitch -> String.String #

showList :: [NPitch pitch] -> ShowS #

Eq pitch => Eq (NPitch pitch) Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: NPitch pitch -> NPitch pitch -> Bool #

(/=) :: NPitch pitch -> NPitch pitch -> Bool #

Pretty pitch => Pretty (NPitch pitch) Source # 
Instance details

Defined in Derive.TScore.T

Methods

pretty :: NPitch pitch -> Text Source #

format :: NPitch pitch -> Doc Source #

formatList :: [NPitch pitch] -> Doc Source #

data Octave Source #

Constructors

Absolute !Int 
Relative !Int 

Instances

Instances details
Show Octave Source # 
Instance details

Defined in Derive.TScore.T

Eq Octave Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Octave -> Octave -> Bool #

(/=) :: Octave -> Octave -> Bool #

Pretty Octave Source # 
Instance details

Defined in Derive.TScore.Parse

data Duration Source #

Constructors

Duration 

Fields

error

newtype Pos Source #

Character position in the input.

Constructors

Pos Int 

Instances

Instances details
Show Pos Source # 
Instance details

Defined in Derive.TScore.T

Methods

showsPrec :: Int -> Pos -> ShowS #

show :: Pos -> String.String #

showList :: [Pos] -> ShowS #

Eq Pos Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Pos -> Pos -> Bool #

(/=) :: Pos -> Pos -> Bool #

Pretty Pos Source # 
Instance details

Defined in Derive.TScore.T

data Error Source #

Constructors

Error !Pos !Text 

Instances

Instances details
Show Error Source # 
Instance details

Defined in Derive.TScore.T

Eq Error Source # 
Instance details

Defined in Derive.TScore.T

Methods

(==) :: Error -> Error -> Bool #

(/=) :: Error -> Error -> Bool #

Pretty Error Source # 
Instance details

Defined in Derive.TScore.T

find_pos :: Text -> Pos -> Maybe (Int, Int, Text) Source #

Find the line and position on that line.