Skip to content

Persistent Entity Declaration QuasiQuote doesn't support type literals #562

@pseudonom

Description

@pseudonom

e.g. If you try to do

import Data.Finite
...

share [mkPersist sqlSettings, mkMigrate "migration"] [persistLowerCase|
  foo (Finite 20)
|]

you're met with an error like Invalid field type "Finite 2001" PSFail ('2',"001").

This is an artifact of https://github.com/yesodweb/persistent/blob/master/persistent/Database/Persist/Quasi.hs#L63 and not any fundamental limitation. type Twenty = 20 works fine as a workaround.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions