Skip to content

Commit 1b84546

Browse files
authored
Merge pull request #5 from haskell-works/enable-record-dot-syntax-globally
Enable record dot syntax globally
2 parents 4424882 + 88bab5a commit 1b84546

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

hw-prelude.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,15 @@ common project-config
5353
FlexibleContexts
5454
FlexibleInstances
5555
LambdaCase
56+
NoFieldSelectors
5657
NoImplicitPrelude
58+
OverloadedRecordDot
5759
OverloadedStrings
5860
RankNTypes
5961
ScopedTypeVariables
6062
TypeApplications
6163
TypeOperators
64+
TypeSynonymInstances
6265
ghc-options: -Wall
6366

6467
if flag(werror)
@@ -88,7 +91,6 @@ library
8891
HaskellWorks.Data.String
8992
HaskellWorks.Error
9093
HaskellWorks.Error.Types
91-
HaskellWorks.Error.Types.All
9294
HaskellWorks.Error.Types.GenericError
9395
HaskellWorks.Error.Types.TimedOut
9496
HaskellWorks.IO.Network.NamedPipe

src/HaskellWorks/Error.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ onLeftM_ :: forall e a m. ()
6767
onLeftM_ f action = onLeft_ f =<< action
6868

6969
-- | Handle the case where a list with many (more than one) elements.
70-
onMany :: forall a m.()
70+
onMany :: forall a m. ()
7171
=> Monad m
7272
=> (NonEmpty a -> m (Maybe a))
7373
-> [a]
@@ -78,7 +78,7 @@ onMany h as = case as of
7878
(x : xs) -> h (x :| xs)
7979

8080
-- | Handle the case where an effectul function returns a list with many (more than one) elements.
81-
onManyM :: forall a m.()
81+
onManyM :: forall a m. ()
8282
=> Monad m
8383
=> (NonEmpty a -> m (Maybe a))
8484
-> m [a]
@@ -87,7 +87,7 @@ onManyM h f =
8787
f >>= onMany h
8888

8989
-- | Handle the case where a list with many (more than one) elements.
90-
onMany_ :: forall a m.()
90+
onMany_ :: forall a m. ()
9191
=> Monad m
9292
=> m (Maybe a)
9393
-> [a]
@@ -98,7 +98,7 @@ onMany_ h as = case as of
9898
_ -> h
9999

100100
-- | Handle the case where an effectul function returns a list with many (more than one) elements.
101-
onManyM_ :: forall a m.()
101+
onManyM_ :: forall a m. ()
102102
=> Monad m
103103
=> m (Maybe a)
104104
-> m [a]

src/HaskellWorks/Error/Types.hs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
module HaskellWorks.Error.Types
2-
( -- * Error types
3-
GenericError(GenericError),
4-
TimedOut(TimedOut),
5-
) where
1+
{-# LANGUAGE DuplicateRecordFields #-}
2+
{-# LANGUAGE TypeSynonymInstances #-}
63

7-
import HaskellWorks.Error.Types.All
4+
module HaskellWorks.Error.Types (
5+
GenericError (..),
6+
TimedOut(..),
7+
) where
8+
9+
import HaskellWorks.Error.Types.GenericError
10+
import HaskellWorks.Error.Types.TimedOut

src/HaskellWorks/Error/Types/All.hs

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)