| syntaxfree | hmm./ should =~ Just Work? |
| Cale | boowax: the second function is also using the list monad -- what are you expecting the type of tmp to be? |
| sorear | @index ByteArray |
| lambdabot | bzzt |
| sorear | @index BA |
| lambdabot | bzzt |
| Cale | boowax: also, you've given in the type signature, the return value as being ThrowsError Type but makeTypeList is going to give a list, not a ThrowsError a |
| boowax | Cale: It should be a list of Type values that I want to use within the dummyFunction but not necessarily return |
| Cale | okay, so you probably want let, and not <- let tmp = makeTypeList t tenv throwError $ EICE (show tmp) return TyBrokenRecord also, might be a good idea to avoid putting tabs in your source files. (get your editor to convert them to spaces) |
| syntaxfree | significant whitespace is such a mixed blessing. my first attempts at haskell barfed not because of types, but of indenting. of course, it was the horrible, contrived example of recursive IO in YAHT. The "age-guesser" program. |
| boowax | Cale: I appreciate your help. I hope you can bear with my ignorance. Do I still need the do {} with the let statement? If you don't mind, I don't really understand what let give me? |
| Cale | Okay. That was intended as a let statement in the do-block. I'm assuming that ThrowsError is a monad. In fact, based on the error you're getting from the compiler, ThrowsError seems like a type synonym for Either ErrorTy |
| action | syntaxfree has become obsessed with spotting Arial and Helvetica, speaking of type. |
| syntaxfree | has become obsessed with spotting Arial and Helvetica, speaking of type. |
| Cale | There are two forms for let in Haskell |
| syntaxfree | now I stare at signs from way too close. |
| Cale | As an expression, you can write: let <decls> in <expr> |
| syntaxfree | I got myself a headache trying to tell Arial from Helvetica on this stupid college zine while on a moving bus that was shaking. |
| Cale | In a do-block, you're allowed to leave off the 'in' part, and the declarations will scope over the remainder of the 'do' That is... |
| boowax | Cale: ThrowsError is basically what you said it was...to allow errors to go up the chain or normal returns to happen |
| Cale | do { <stmts1>; let <decls>; <stmts2> } = do { <stmts1>; let <decls> in do { <stmts2> } } <decls> is a bunch of local declarations of values you want to define. For example... > let x = 5 in x + x |
| lambdabot | 10 |
| Cale | > do { x <- [1..10]; let y = x^2; return y } |
| lambdabot | Parse error |
| Cale | > do { x <- [1..10]; let {y = x^2}; return y } |