Typos in Documentation for Database.Persist.Quasi
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- haskell
- Lĩnh vực
- documentation
Hướng nghiên cứu
Tìm trong tài liệu Database.Persist.Quasi phần “Sum types” và tiểu mục “Field level” của phần đó, sử dụng đoạn trích Employment làm điểm bắt đầu. Sửa ví dụ derivePersistField và đổi “strins” thành “strings”; công việc được hoàn tất khi cả hai lỗi chính tả đều được sửa trong tài liệu đã kết xuất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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:
derivePersistFieldstores 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.
- Ngôn ngữ chính
- Haskell
- Star
- 486
- Fork
- 307
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của yesodweb/persistent
-
use aeson >= 2.3.0.0 to avoid HSEC-2026-0007Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
yesodweb/persistent#1635 · 1 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
yesodweb/persistent#1643 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
yesodweb/persistent#1642 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
yesodweb/persistent#1641 ·
-
Regression since bumping resource-pool from `0.4.0.0` to `0.5.x`Có thể đã có người làm @swamp-agr đã nhận 72 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
yesodweb/persistent#1636 ·
Tất cả issue của yesodweb/persistent
Issue tương tự
-
docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 66/100
simplex-chat/simplex-chat#8043 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
haskell-servant/servant#1929 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
fmidue/haskell-template-task#77 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
haskell/network-uri#92 ·