Skip to content

Instantly share code, notes, and snippets.

@konsumlamm
Last active May 2, 2022 00:22
Show Gist options
  • Save konsumlamm/75f28d9cac2f85ddbd5d1bf1ea9e8860 to your computer and use it in GitHub Desktop.
Save konsumlamm/75f28d9cac2f85ddbd5d1bf1ea9e8860 to your computer and use it in GitHub Desktop.
==================== Tidy Core ====================
Result size of Tidy Core
= {terms: 85, types: 36, coercions: 4, joins: 0/0}
lvl_rN3 :: Addr#
lvl_rN3 = "error"#
lvl1_rN4 :: [Char]
lvl1_rN4 = unpackCString# lvl_rN3
$trModule4 :: Addr#
$trModule4 = "testing-0.1.0.0-inplace"#
lvl2_rN5 :: [Char]
lvl2_rN5 = unpackCString# $trModule4
$trModule2 :: Addr#
$trModule2 = "Lib"#
lvl3_rN6 :: [Char]
lvl3_rN6 = unpackCString# $trModule2
lvl4_rN7 :: Addr#
lvl4_rN7 = "src/Lib.hs"#
lvl5_rN8 :: [Char]
lvl5_rN8 = unpackCString# lvl4_rN7
lvl6_rN9 :: Int
lvl6_rN9 = I# 8#
lvl7_rNa :: Int
lvl7_rNa = I# 11#
lvl8_rNb :: Int
lvl8_rNb = I# 16#
lvl9_rNc :: SrcLoc
lvl9_rNc
= SrcLoc
lvl2_rN5 lvl3_rN6 lvl5_rN8 lvl6_rN9 lvl7_rNa lvl6_rN9 lvl8_rNb
lvl10_rNd :: CallStack
lvl10_rNd = PushCallStack lvl1_rN4 lvl9_rNc EmptyCallStack
lvl11_rNe :: Addr#
lvl11_rNe = "this is an example"#
example :: forall a. a
example
= \ (@a_awn) ->
error
(lvl10_rNd `cast` <Co:4> :: CallStack ~R# (?callStack::CallStack))
(unpackCString# lvl11_rNe)
mySrcLoc6 :: Addr#
mySrcLoc6 = "lol"#
mySrcLoc5 :: [Char]
mySrcLoc5 = unpackCString# mySrcLoc6
mySrcLoc4 :: Addr#
mySrcLoc4 = "Yes"#
mySrcLoc3 :: [Char]
mySrcLoc3 = unpackCString# mySrcLoc4
mySrcLoc2 :: Addr#
mySrcLoc2 = "No.hs"#
mySrcLoc1 :: [Char]
mySrcLoc1 = unpackCString# mySrcLoc2
mySrcLoc :: SrcLoc
mySrcLoc = SrcLoc mySrcLoc5 mySrcLoc3 mySrcLoc1 12# 3# 42# 5#
$trModule3 :: TrName
$trModule3 = TrNameS $trModule4
$trModule1 :: TrName
$trModule1 = TrNameS $trModule2
$trModule :: Module
$trModule = Module $trModule3 $trModule1
{-# OPTIONS_GHC -ddump-simpl -dsuppress-all -dno-suppress-type-signatures #-}
module Lib where
import GHC.Stack (SrcLoc(..))
example :: a
example = error "this is an example"
mySrcLoc :: SrcLoc
mySrcLoc = SrcLoc
{ srcLocPackage = "lol"
, srcLocModule = "Yes"
, srcLocFile = "No.hs"
, srcLocStartLine = 12
, srcLocStartCol = 3
, srcLocEndLine = 42
, srcLocEndCol = 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment