diff options
Diffstat (limited to 'testsuite/tests/cpranal/should_compile/T18401.stderr')
-rw-r--r-- | testsuite/tests/cpranal/should_compile/T18401.stderr | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/tests/cpranal/should_compile/T18401.stderr b/testsuite/tests/cpranal/should_compile/T18401.stderr new file mode 100644 index 0000000000..e299ba4dc7 --- /dev/null +++ b/testsuite/tests/cpranal/should_compile/T18401.stderr @@ -0,0 +1,35 @@ + +==================== Tidy Core ==================== +Result size of Tidy Core = {terms: 54, types: 101, coercions: 0, joins: 0/0} + +Rec { +-- RHS size: {terms: 20, types: 31, coercions: 0, joins: 0/0} +T18401.safeInit_$spoly_$wgo1 :: forall {a}. a -> [a] -> (# Bool, [a] #) +T18401.safeInit_$spoly_$wgo1 + = \ (@a_aO1) (sc_s17W :: a_aO1) (sc1_s17V :: [a_aO1]) -> + case sc1_s17V of { + [] -> (# GHC.Types.True, GHC.Types.[] @a_aO1 #); + : y_a158 ys_a159 -> (# GHC.Types.True, GHC.Types.: @a_aO1 sc_s17W (case T18401.safeInit_$spoly_$wgo1 @a_aO1 y_a158 ys_a159 of { (# ww_s17y, ww1_s17z #) -> ww1_s17z }) #) + } +end Rec } + +-- RHS size: {terms: 17, types: 25, coercions: 0, joins: 0/0} +si :: forall a. [a] -> (Bool, [a]) +si + = \ (@a_s17i) (w_s17j :: [a_s17i]) -> + case w_s17j of { + [] -> (GHC.Types.False, GHC.Types.[] @a_s17i); + : y_a158 ys_a159 -> (GHC.Types.True, case T18401.safeInit_$spoly_$wgo1 @a_s17i y_a158 ys_a159 of { (# ww_X3, ww1_X4 #) -> ww1_X4 }) + } + +-- RHS size: {terms: 14, types: 22, coercions: 0, joins: 0/0} +safeInit :: forall a. [a] -> Maybe [a] +safeInit + = \ (@a_aO1) (xs_aus :: [a_aO1]) -> + case xs_aus of { + [] -> GHC.Maybe.Nothing @[a_aO1]; + : y_a158 ys_a159 -> GHC.Maybe.Just @[a_aO1] (case T18401.safeInit_$spoly_$wgo1 @a_aO1 y_a158 ys_a159 of { (# ww_X3, ww1_X4 #) -> ww1_X4 }) + } + + + |