git.iko.soy/typeable/haskell-stack-trace-plugin
on master help sign in
47 lines 550 B history raw
1module Main where
3import Data.Maybe (fromJust)
4import GHC.Stack
6main :: IO ()
7main = print f1
9f1 :: Int
10f1 = f2
12f2 :: Int
13f2 = f3
15-- HsQualTy
16f3 :: HasCallStack => Int
17f3 = f4 0
19-- HsQualTy
20f4 :: Show a => a -> Int
21f4 n = f5 (show n) 0
23-- HsFunTy
24f5 :: String -> Int -> Int
25f5 _ _ = head f6
27-- HsListTy
28f6 :: [Int]
29f6 = [fst f7]
31-- HsTupleTy
32f7 :: (Int, Int)
33f7 = (fromJust f8, fromJust f8)
35-- HsAppTy
36f8 :: Maybe Int
37f8 = Just f9
39f9 :: Int
40f9 = f10
41 where
42 f10 :: Int
43 f10 = fError
45-- HsTyVar
46fError :: Int
47fError = error "fError"