Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#875 closed bug (fixed)

assert fails on HEAD

Reported by: guest Owned by:
Priority: high Milestone: 6.6
Component: Compiler Version: 6.5
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Example of failure

[andy@thunderegg should_run]$ cat dsrun014.hs 
module Main where

import Control.Exception ( assert )

main = assert "Hello" True $ print "World"

[andy@thunderegg should_run]$ $GHC66 dsrun014.hs 

    Couldn't match expected type `GHC.Prim.Addr#'
           against inferred type `[Char]'
    In the first argument of `GHC.Err.assertError', namely
    In the call (GHC.Err.assertError "dsrun014.hs:5:7-12" "Hello" True)
    In the first argument of `($)', namely
        `GHC.Err.assertError "dsrun014.hs:5:7-12" "Hello" True'

Change History (5)

comment:1 Changed 13 years ago by simonmar

Milestone: 6.6
Priority: normalhigh

comment:2 Changed 13 years ago by igloo

Resolution: fixed
Status: newclosed

Fixed, thanks (although the example program given is not type correct either - Control.Exception.assert has type Bool -> a -> a ).

Thanks Ian

comment:3 Changed 11 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 11 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 10 years ago by simonmar

difficulty: Easy (1 hr)Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.