User:Benmachine/Cont
From HaskellWiki
(Difference between revisions)
(New page: This seemed to break things: <hask>{-# LANGUAGE NoOverlappingInstances -#</hask>}. If I then go, um, <hask>foo</hask>, and then this: <haskell> main = do putStrLn "I broke it :(" </haske...) |
|||
| Line 1: | Line 1: | ||
| - | + | When you do this: <hask>{-</hask>, terrible things happen. | |
| - | + | ||
| - | + | Here's some nicely-formatted code: | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | |||
<haskell> | <haskell> | ||
id :: a -> a | id :: a -> a | ||
| - | id x = x | + | id x = const x x |
const :: a -> b -> a | const :: a -> b -> a | ||
| - | const x _ = x | + | const x _ = id x |
</haskell> | </haskell> | ||
| - | + | which is now ruined. <hask>-}</hask> does that fix it? It doesn't seem to. | |
| + | |||
| + | == The problem == | ||
| + | |||
| + | doesn't even stop at section boundaries: | ||
| + | <haskell> | ||
| + | error :: String -> a | ||
| + | error str = error (error str) | ||
