Last active
November 5, 2017 09:16
-
-
Save utdemir/92d8c4bc3725d52dc01738ab9e4b4bab 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
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{- | |
This piece of code makes GHC never terminate. | |
$ ghc --version | |
The Glorious Glasgow Haskell Compilation System, version 8.0.2 | |
$ ghc-pkg list | grep servant | |
servant-0.11 | |
servant-server-0.11.0.1 | |
-} | |
module Test where | |
import Servant | |
type MyAPI = Post '[JSON] () :<|> Get '[JSON] () | |
server :: Server IO | |
server = enter (undefined :: IO :~> Handler) (undefined :: ServerT MyAPI IO) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 10 should be
server :: Server MyAPI
for the program to be type-correct.