fork download
  1. Prelude> let f (x:xs) = (x:xs)
  2.  
  3. ==================== Simplified expression ====================
  4. GHC.Base.returnIO
  5. @ [()]
  6. (GHC.Types.:
  7. @ ()
  8. ((\ (@ a_a131) (ds_d13a :: [a_a131]) ->
  9. case ds_d13a of _ [Occ=Dead] {
  10. [] ->
  11. Control.Exception.Base.patError
  12. @ 'GHC.Types.PtrRepLifted
  13. @ [a_a131]
  14. "<interactive>:4:5-21|function f"#;
  15. : x_a12Q xs_a12R -> GHC.Types.: @ a_a131 x_a12Q xs_a12R
  16. })
  17. `cast` (UnsafeCo representational
  18. (forall a_a131. [a_a131] -> [a_a131]) ()
  19. :: ((forall a_a131. [a_a131] -> [a_a131]) :: *) ~R# (() :: *)))
  20. (GHC.Types.[] @ ()))
  21.  
  22.  
  23. Prelude> let f a@(x:xs) = a
  24.  
  25. ==================== Simplified expression ====================
  26. GHC.Base.returnIO
  27. @ [()]
  28. (GHC.Types.:
  29. @ ()
  30. ((\ (@ t_a13D) (a_a13s :: [t_a13D]) ->
  31. case a_a13s of wild_X3 {
  32. [] ->
  33. Control.Exception.Base.patError
  34. @ 'GHC.Types.PtrRepLifted
  35. @ [t_a13D]
  36. "<interactive>:5:5-18|function f"#;
  37. : x_a13t xs_a13u -> wild_X3
  38. })
  39. `cast` (UnsafeCo representational
  40. (forall t_a13D. [t_a13D] -> [t_a13D]) ()
  41. :: ((forall t_a13D. [t_a13D] -> [t_a13D]) :: *) ~R# (() :: *)))
  42. (GHC.Types.[] @ ()))
  43.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty