You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@raichoo reports a nasty bug related to text (it's still unclear what exactly is going on here, although I suspect text's RULE framework to be the culprit -- I hope so at least, as the alternative would mean that several GHC releases out there may generate wrong code):
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
moduleMainwhereimportPreludehiding (length, filter)
importData.TextcurrencyParser::Text->Bool
currencyParser x = cond ==1where
cond =length fltr
fltr =filter (==',') x
main::IO()
main =print (currencyParser "0,00")
when compiling this with -O0 or running in GHCi, the proper True output is generated. However, when compiling with -O1 the wrong False output is generated.