yesodweb / yesodweb/persistent

derivePersistField phantom type support

Open
#1,137 8 comments 0 reactions 1 assignee View on GitHub

@juanpaucar is already working on this.

Since Oct 29, 2020.

Feature Request good first issue
Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

Phantom types are very useful for tagging things on type level, but at the moment this code will not compile

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

import Database.Persist.TH
import Prelude

data Employment a = Employed | Unemployed | Retired
    deriving (Show, Read, Eq)
derivePersistField "Employment a"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.