Skip to content

Instantly share code, notes, and snippets.

@Wizek
Last active March 10, 2016 19:04
Show Gist options
  • Select an option

  • Save Wizek/115e751ef4af911bc344 to your computer and use it in GitHub Desktop.

Select an option

Save Wizek/115e751ef4af911bc344 to your computer and use it in GitHub Desktop.
data NotificationType = NotifTypeRequest | NotifTypeAccept
deriving (Read, Show, Eq, Enum)
derivePersistField "NotificationType"
Model.hs:19:1:
Multiple declarations of ‘NotificationId’
Declared at: Model.hs:19:1
Model.hs:19:1
@Wizek

Wizek commented Mar 10, 2016

Copy link
Copy Markdown
Author

This was the problem:

NotificationId
  createdAt UTCTime
  user UserId
  gcm Text
  deriving Show

Notification
  createdAt UTCTime
  recipient UserId
  nType NotificationType
  deriving Show

Notification gets an id field too by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment