Conversation
| @@ -1,5 +1,5 @@ | |||
| {-# LANGUAGE ScopedTypeVariables #-} | |||
| {-# LANGUAGE UndecidableInstances #-} -- FIXME | |||
| * https://github.com/lpsmith/postgresql-simple/issues/69 | ||
| * https://github.com/nikita-volkov/hasql-postgres/issues/1 | ||
|
|
||
| ## Documentation Comments |
| let [nameField, parentField] = entityFields edef | ||
| fieldComments nameField | ||
| `shouldBe` | ||
| Just "Fields should be documentable.\n" |
| {-# LANGUAGE StandaloneDeriving, UndecidableInstances #-} | ||
| {-# LANGUAGE ViewPatterns #-} | ||
|
|
||
| {-| |
| removeSpaces | ||
| . filter (not . empty) | ||
| . map tokenize | ||
| . T.lines |
| data LinesWithComments = LinesWithComments | ||
| { lwcLines :: NonEmpty (Line' NonEmpty) | ||
| , lwcComments :: [Text] | ||
| } deriving (Eq, Show) |
| associateLines :: [Line' NonEmpty] -> [LinesWithComments] | ||
| associateLines lines = | ||
| foldr combine [] $ | ||
| foldr toLinesWithComments [] lines |
| if minIndent < otherIndent then | ||
| appendLwc lwc lwc' : lwcs | ||
| else | ||
| lwc : lwc' : lwcs |
| minimumIndentOf = minimum . fmap lineIndent . lwcLines | ||
|
|
||
| skipEmpty :: [Line' []] -> [Line' NonEmpty] | ||
| skipEmpty = mapMaybe (traverseLine NEL.nonEmpty) |
| Nothing -> | ||
| ( maybe id (:) (setFieldComments comments <$> takeColsEx ps x) acc | ||
| , [] | ||
| ) |