Created
August 29, 2019 21:48
-
-
Save JakobBruenker/02a9d69ae6bfbf8305f16c2e2cfac659 to your computer and use it in GitHub Desktop.
This produces (almost) 5000 lines of type error
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 GADTs #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
module LongTypeError where | |
import Data.Singletons.Prelude | |
data Data f where | |
DataCon :: (a -> b) -> Data (a -> b) | |
function :: f -> Data f | |
function = undefined | |
type family TypeFam f fun where | |
TypeFam f (a -> b) = f a -> TypeFam f b | |
lift :: forall f fun . fun -> TypeFam f fun | |
lift fun = case function fun of | |
DataCon f -> \x -> _ (f <*> x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment