#1312: runghc doesn't respect -main-is
-------------------------+--------------------------------------------------
    Reporter:  simonmar  |        Owner:             
        Type:  bug       |       Status:  new        
    Priority:  normal    |    Milestone:  6.8        
   Component:  Compiler  |      Version:  6.6.1      
    Severity:  minor     |   Resolution:             
    Keywords:            |   Difficulty:  Easy (1 hr)
          Os:  Unknown   |     Testcase:             
Architecture:  Multiple  |  
-------------------------+--------------------------------------------------
Comment (by Isaac Dupree):

 Other unix programs' example -e behavior (well, at least in the GNU
 versions):
 {{{
 #sed: run the two expressions in sequence (for each line)
 echo 123 | sed -e 's/1/2/g' -e 's/2/4/g'
 443
 }}}
 {{{
 #grep: any -e argument has to match (for each line)
 echo 123 | grep -e 12 -e 24
 123
 }}}
 On the other hand, the same programs ''also'' split their expression
 arguments into lines and treat the separate lines as if they were separate
 arguments to separate -e's.  Personally I'd rather not have this unix
 behavior :)
 {{{
 printf '5\n3\n12\n' | grep -e "$(printf '12\n3')"
 3
 12
 }}}
 {{{
 #sed's syntax is _designed_ to have scripts where the lines are sequenced
 #(unlike Haskell's expression syntax)
 printf '5\n3\n12\n' | sed -e "$(printf 's/1/2/g\ns/2/4/g')"
 5
 3
 44
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1312>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to