Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Showing with 21 additions and 7 deletions.
  1. +16 −7 README.markdown
  2. +5 −0 examples/Bad.hs
View
23 README.markdown
@@ -38,30 +38,39 @@ Turns:
{-# LANGUAGE GeneralizedNewtypeDeriving,
ViewPatterns,
ScopedTypeVariables #-}
-
+
module Bad where
-
+
import Control.Applicative ((<$>))
import System.Directory (doesFileExist)
-
+
import qualified Data.Map as M
import Data.Map ((!), keys, Map)
+ data Point = Point
+ { pointX, pointY :: Double
+ , pointName :: String
+ } deriving (Show)
+
into:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
- {-# LANGUAGE ViewPatterns #-}
-
+
module Bad where
-
+
import Control.Applicative ((<$>))
import System.Directory (doesFileExist)
-
+
import Data.Map (Map, keys, (!))
import qualified Data.Map as M
+ data Point = Point
+ { pointX, pointY :: Double
+ , pointName :: String
+ } deriving (Show)
+
Configuration
-------------
View
5 examples/Bad.hs
@@ -10,3 +10,8 @@ import System.Directory (doesFileExist)
import qualified Data.Map as M
import Data.Map ((!), keys, Map)
+
+data Point = Point
+ { pointX, pointY :: Double
+ , pointName :: String
+ } deriving (Show)
Please sign in to comment.
Something went wrong with that request. Please try again.