Created
November 15, 2017 18:02
-
-
Save pjones/07a80e95d7d1cacdbdc07ff4d40587e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: issue76 | |
version: 0.1.0.0 | |
license: BSD3 | |
author: Peter J. Jones | |
maintainer: pjones@devalot.com | |
build-type: Simple | |
cabal-version: >=1.10 | |
library | |
exposed-modules: | |
Person | |
default-language: Haskell2010 | |
ghc-options: -Wall -fwarn-incomplete-uni-patterns | |
build-depends: base >= 4.9 && < 5 | |
, groundhog >= 0.8 && < 0.9 | |
, groundhog-th >= 0.8 && < 0.9 | |
, text >= 1.2 && < 1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Person where | |
import Data.Text (Text) | |
import Database.Groundhog | |
import Database.Groundhog.TH | |
data Person = Person | |
{ personName :: Text | |
, personAge :: Int | |
} | |
mkPersist defaultCodegenConfig [groundhog| | |
entity: Person | |
|] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment