Skip to content

Instantly share code, notes, and snippets.

@klapaucius
Created December 9, 2011 15:50
Show Gist options
  • Save klapaucius/1452057 to your computer and use it in GitHub Desktop.
Save klapaucius/1452057 to your computer and use it in GitHub Desktop.
module Main(main) where
foo :: [()] -> ()
foo x = bar x where
bar x = {-# SCC "my" #-} head x
main = print $ foo []
{-
*** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace:
GHC.List.CAF
--> evaluated by: Main.my,
called from Main.foo.bar,
called from Main.foo,
called from Main.main,
called from Main.CAF
--> evaluated by: Main.main,
called from Main.CAF
Main: Prelude.head: empty list
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment