Skip to content

Instantly share code, notes, and snippets.

@fionafibration
Created June 30, 2020 16:36
Show Gist options
  • Save fionafibration/c54d1cbe966bbc5b170887582c2bced5 to your computer and use it in GitHub Desktop.
Save fionafibration/c54d1cbe966bbc5b170887582c2bced5 to your computer and use it in GitHub Desktop.
GHC Killer using undecidable typechecking
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -freduction-depth=0 #-}
class X a where y :: a
instance X [a] => X a where y = undefined
main = print (y :: int)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment