[GHC] #14355: Improvement of lazy evaluation

#14355: Improvement of lazy evaluation -------------------------------------+------------------------------------- Reporter: vanto | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Hello, consider the following example:\\ {{{ Prelude> let d = (\x y -> (+)) Prelude> :t d d :: Num a => p1 -> p2 -> a -> a -> a }}} and calculating these expressions:\\ example 1:\\ {{{ Prelude> d (/) ({-# LANGUAGE TypeNTypes #-}) 1 6 Prelude> d ((\x y -> 1/0)2 3) (\x y -> 1/0) 6 3 Prelude> d 1 2 3 4 Prelude> d 'e' 'r' 5 6 Prelude> d [1] [5] 1 1 Prelude> d (1/0) (1/0) 1 0 Prelude> d (1 `div` 0) 5 3 2 Prelude> d (0/0) (0/0) 1 0 Prelude> d undefined undefined 1 0 Prelude> d True False 1 2 Prelude> d otherwise otherwise 4 3 Prelude> d maybe maybe 8 9 Prelude> d Nothing Nothing 0 7 Prelude> d EQ EQ 4 5 Prelude> d (+) (+) 0 9 Prelude> d error error 1 2 Prelude> d interact interact 1 3 Prelude> d min max 6 4 Prelude> d (:) (:) 7 3 Prelude> d foldl foldr 1 7 }}} and this:\\ example 2:\\ {{{ Prelude> d _ _ 1 2 Prelude> d a z 3 5 Prelude> d (\x -> (*/*)) (\x -> (*/*)) 2 7 Prelude> d (otherwise/otherwise) 2 6 4 }}} and this:\\ example 3: {{{ Prelude> d (/) ({-# #-}) 1 6 }}} Are the results correct? Yes. Is this consistent with common sense? No. Here again, it does not make sense. No comment, I hope this is clear to everyone.\\ Example 2 should provide a result as an example 1. it makes sense.\\ See example 3. A result with warning. you understand? Those who do not understand can close the ticket. Others can re-open the ticket, think better and improve. Do not waste your time answering me that you do not agree. This is only another idea to improve lazy evaluation. Of course, I will not make a proposal. Thank you. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14355 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14355: Improvement of lazy evaluation -------------------------------------+------------------------------------- Reporter: vanto | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * status: new => closed * resolution: => invalid Comment:
Those who do not understand can close the ticket.
Will do. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14355#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC