Typos in Documentation for Database.Persist.Quasi

オープン 初心者向け
#1,634 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@000wahab000 がすでに取り組んでいます。

2026年9月5日 から。

  • #1640 @000wahab000 による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
82/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
haskell
領域
documentation

調査の方向性

Database.Persist.Quasi のドキュメントで、Employment スニペットを入口として “Sum types” セクションとその “Field level” サブセクションを探します。derivePersistField の例を修正し、“strins” を “strings” に変更します。レンダリングされたドキュメントで両方の誤字が修正されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Typo 1: Database.Persist.Quasi, section "Sum types", subsection "Field level"

In the subsection, one can find the following code snippet:

-- @Employment.hs
{-# LANGUAGE TemplateHaskell #-}
module Employment where

import Database.Persist.TH
import Prelude

data Employment = Employed | Unemployed | Retired
    deriving (Show, Read, Eq)
derivePersistField Employment       <-------

However, copying this code directly will result in the following error:

Illegal term-level use of the type constructor or class 'Employment'
...
In the first argument of 'derivedPersistField', namely
  'Employment'
In the expression: derivePersistField Employment [GHC-31891]

This was likely a typo; changing Employment to "Employment" as a string seems to solve the issue.

Typo 2:

Right under the code snippet of the previous typo, there was the following passage:

derivePersistField stores sum type values as strins in the database. While not as efficient as using integers, this approach simplifies adding and removing values from your enumeration.

The strins likely should have been strings.

主要言語
Haskell
スター
486
フォーク
307
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

yesodweb/persistent のほかの issue

yesodweb/persistent の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。