Skip to content

Instantly share code, notes, and snippets.

@bergmark
Created November 12, 2014 23:19
Show Gist options
  • Select an option

  • Save bergmark/94bb33e58033301c5580 to your computer and use it in GitHub Desktop.

Select an option

Save bergmark/94bb33e58033301c5580 to your computer and use it in GitHub Desktop.
data Static = X | Y
resource :: Resource WithA WithB Ident Void Static
resource = mkResourceReader
{ R.name = "foo"
, R.schema = noListing $ named
[ ("id" , singleRead ById )
, ( "x" , static X )
, ( "y" , static Y )
]
, R.get = Just get
, R.statics = \case
X -> x
Y -> y
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment