[Haskell-beginners] Time interval calculation

Daniel Fischer daniel.is.fischer at web.de
Sat Mar 13 17:08:31 EST 2010


Am Samstag 13 März 2010 23:09:48 schrieb legajid:
> I tried
>
> !t1f <- gettime
>
> and i got an error message :
> premier.hs:92:1: Illegal bang-pattern (use -XBangPatterns)
> Failed, modules loaded: none.
>
>
> t1f <- !gettime gives :
> premier.hs:92:8: parse error on input `!'
> Failed, modules loaded: none.

Ah yes, you must tell GHC that you want to use bang-patterns, best with a 

{-# LANGUAGE BangPatterns #-}

pragma right at the top of the file 
(you can too easily forget to pass -XBangPatterns on the command ine).


More information about the Beginners mailing list