Skip to content

Instantly share code, notes, and snippets.

@phadej
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phadej/8b628d579ddf6958d937 to your computer and use it in GitHub Desktop.
Save phadej/8b628d579ddf6958d937 to your computer and use it in GitHub Desktop.
Compiles without warnings!
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE RankNTypes #-}
module Data.Foo where
import "void" Data.Void as A
import Data.Void as B
foo :: A.Void -> a
foo = absurd
bar :: B.Void -> a
bar x = x ()
name: test
version: 0.1.0.0
license-file: LICENSE
author: Oleg Grenrus
maintainer: oleg.grenrus@iki.fi
build-type: Simple
cabal-version: >=1.10
library
exposed-modules: Data.Foo, Data.Void
ghc-options: -Wall
build-depends: base >=4.7 && <4.8, void == 0.7
default-language: Haskell2010
{-# LANGUAGE RankNTypes #-}
module Data.Void where
type Void = forall a b. a -> b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment