loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.09189133826490692","path":"main.hs","file":{"path":"main.hs","content":{"asEncoding":{"base64":"YWRkT25lIDo6IE51bSBhID0+IGEgLT4gYQphZGRPbmUgYSA9IGEgKyAxCgptYWluID0gZG8KICBwcmludCAkIGZtYXAgYWRkT25lIFsgXQogIHByaW50ICQgZm1hcCBhZGRPbmUgWzFdCiAgcHJpbnQgJCBmbWFwIGFkZE9uZSBbMSwgMiwgM10KICAKICBwcmludCAkIGZtYXAgYWRkT25lIChOb3RoaW5nKQogIHByaW50ICQgZm1hcCBhZGRPbmUgKEp1c3QgMikKICAKICBwcmludCAkIGZtYXAgYWRkT25lIChMZWZ0ICAwIDo6IEVpdGhlciBJbnQgSW50KQogIHByaW50ICQgZm1hcCBhZGRPbmUgKFJpZ2h0IDIgOjogRWl0aGVyIEludCBJbnQp"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
addOne :: Num a => a -> a
addOne a = a + 1

main = do
  print $ fmap addOne [ ]
  print $ fmap addOne [1]
  print $ fmap addOne [1, 2, 3]
  
  print $ fmap addOne (Nothing)
  print $ fmap addOne (Just 2)
  
  print $ fmap addOne (Left  0 :: Either Int Int)
  print $ fmap addOne (Right 2 :: Either Int Int)
GHCi, version 8.6.5