Re: [Haskell-cafe] type/class question: toString

2007-11-07 Thread Nicholas Messenger
uot;blah" "blah" *Main> toString 1 "1" *Main> toString (Just 0.5) "Just 0.5" So Strings are just cast into the result. Non-strings become Nothing, which fromMaybe turns into (show x). -- Nicholas Messenger [EMAIL PROTECTED] On Nov 6, 2007 4:23 PM, Graham

Re: [Haskell-cafe] Compile-time evaluation

2007-11-02 Thread Nicholas Messenger
hat horrendous pain in implementing toExp and it already exists?!? GRRAGGHHRAWWRRRAAGGGH! *sob* ... Ah, well, I learned me some Data.Generics anyway. :3 -- Nicholas Messenger (nmessenger at gmail.com, omnId on #haskell) ___ Haskell-Cafe mailing

[Haskell-cafe] Compile-time evaluation

2007-11-02 Thread Nicholas Messenger
post into CompileTime.hs, load into ghci, :set -fth, and -- futz around with the splices. -- -- -- Nicholas Messenger (nmessenger at gmail.com, omnId on #haskell) module CompileTime(compileTimeEval, compileTimeIO) where import Data.Generics import Language.Haskell.TH import Control.Monad import D