Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .stylish-haskell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# stylish-haskell configuration file
# ==================================

# The stylish-haskell tool is mainly configured by specifying steps. These steps
# are a list, so they have an order, and one specific step may appear more than
# once (if needed). Each file is processed by these steps in the given order.
steps:
# Import cleanup
- imports:
# There are different ways we can align names and lists.
#
# - global: Align the import names and import list throughout the entire
# file.
#
# - file: Like global, but don't add padding when there are no qualified
# imports in the file.
#
# - group: Only align the imports per group (a group is formed by adjacent
# import lines).
#
# - none: Do not perform any alignment.
#
# Default: global.
align: file

# Language pragmas
- language_pragmas:
# We can generate different styles of language pragma lists.
#
# - vertical: Vertical-spaced language pragmas, one per line.
#
# - compact: A more compact style.
#
# - compact_line: Similar to compact, but wrap each line with
# `{-#LANGUAGE #-}'.
#
# Default: vertical.
style: vertical

# stylish-haskell can detect redundancy of some language pragmas. If this
# is set to true, it will remove those redundant pragmas. Default: true.
remove_redundant: true

# Replace tabs by spaces. This is disabled by default.
# - tabs:
# # Number of spaces to use for each tab. Default: 8, as specified by the
# # Haskell report.
# spaces: 8

# Remove trailing whitespace
- trailing_whitespace: {}

# A common setting is the number of columns (parts of) code will be wrapped
# to. Different steps take this into account. Default: 80.
columns: 94

# Sometimes, language extensions are specified in a cabal file or from the
# command line instead of using language pragmas in the file. stylish-haskell
# needs to be aware of these, so it can parse the file correctly.
#
# No language extensions are enabled by default.
language_extensions:
- MultiParamTypeClasses
2 changes: 1 addition & 1 deletion main/labsat-cli.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

-- | LabSat telnet interface
--
import Labsat
import Options.Generic
import Preamble
import Labsat

-- | Args
--
Expand Down
20 changes: 10 additions & 10 deletions src/Labsat.hs
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}

module Labsat where

import Control.Concurrent.Async.Lifted (race_)
import Control.Concurrent.Lifted (threadDelay)
import Control.Concurrent.Async.Lifted (race_)
import Control.Concurrent.Lifted (threadDelay)
import Data.Attoparsec.ByteString
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C
import Data.Conduit
import Data.Conduit.Attoparsec
import qualified Data.Conduit.Binary as B
import qualified Data.Conduit.Binary as B
import Data.Conduit.Network
import Data.Text.Encoding (encodeUtf8)
import Data.Text.Encoding (encodeUtf8)
import Labsat.Ctx
import Labsat.Parser
import Labsat.Types
import Preamble
import System.IO hiding (print, putStrLn)
import System.IO hiding (print, putStrLn)


--------------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions src/Labsat/Ctx.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}

module Labsat.Ctx where

Expand Down
9 changes: 5 additions & 4 deletions src/Labsat/Parser.hs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedStrings #-}

module Labsat.Parser where


import qualified Data.ByteString as BS
import Data.Attoparsec.ByteString
import Data.Attoparsec.ByteString.Char8 (char, decimal, double, isDigit_w8, isEndOfLine, scientific, signed)
import Data.Attoparsec.ByteString.Char8 (char, decimal, double, isDigit_w8,
isEndOfLine, scientific, signed)
import qualified Data.ByteString as BS
import Labsat.Types
import Preamble hiding (takeWhile)
import Preamble hiding (takeWhile)


--------------------------------------------------------------------------------
Expand Down