haskell-fsrs
Safe HaskellSafe-Inferred
LanguageHaskell2010

FSRS.Types

Description

The vocabulary shared by the whole package: the four grades a reviewer can give a card, and the two-variable memory state FSRS tracks for it.

Synopsis

Ratings

data Rating Source #

How well the card was recalled. The Enum instance counts from 0; the FSRS papers and reference implementations number the ratings from 1, which is what ratingToInt gives you.

Constructors

Again 
Hard 
Good 
Easy 

Instances

Instances details
Bounded Rating Source # 
Instance details

Defined in FSRS.Types

Enum Rating Source # 
Instance details

Defined in FSRS.Types

Read Rating Source # 
Instance details

Defined in FSRS.Types

Show Rating Source # 
Instance details

Defined in FSRS.Types

Eq Rating Source # 
Instance details

Defined in FSRS.Types

Methods

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

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

Ord Rating Source # 
Instance details

Defined in FSRS.Types

allRatings :: [Rating] Source #

Every rating, from Again to Easy.

ratingToInt :: Rating -> Int Source #

The rating as FSRS numbers it: 1 for Again through 4 for Easy.

ratingFromInt :: Int -> Maybe Rating Source #

Inverse of ratingToInt. Nothing outside 1..4.

Memory state

Type synonyms

type Stability = Double Source #

Memory half-life in days: the larger it is, the slower the card is forgotten. In FSRS-7 stability is a genuine continuous quantity — sub-day values are meaningful and are what the model uses for same-day reviews.

type Difficulty = Double Source #

How hard the card is for this reviewer, on a [1, 10] scale.

type Retrievability = Double Source #

Probability of recall, in (0, 1].

type Days = Double Source #

A duration in days. Fractional values are meaningful throughout FSRS-7: ten minutes is 10 / 1440.