on dev help sign in
ghc-8.2.1
7c8fe2dEitan Chatav
squeal-postgresql/src/Squeal/PostgreSQL/Schema.hs+5−5
@@ -9,6 +9,7 @@
9 , PolyKinds
9 , PolyKinds
10 , RankNTypes
10 , RankNTypes
11 , ScopedTypeVariables
11 , ScopedTypeVariables
12+ , TypeApplications
12 , TypeFamilies
13 , TypeFamilies
13 , TypeOperators
14 , TypeOperators
14#-}
15#-}
@@ -43,7 +44,6 @@ module Squeal.PostgreSQL.Schema
43import Data.ByteString
44import Data.ByteString
44import Data.Monoid
45import Data.Monoid
45import Data.String
46import Data.String
46−import GHC.Exts
47import GHC.OverloadedLabels
47import GHC.OverloadedLabels
48import GHC.TypeLits
48import GHC.TypeLits
49
49
@@ -91,10 +91,10 @@ instance PGFloating 'PGfloat8
91
91
92type (:::) (alias :: Symbol) (ty :: polykind) = '(alias,ty)
92type (:::) (alias :: Symbol) (ty :: polykind) = '(alias,ty)
93
93
94−data Alias (alias :: Symbol) = Alias (Proxy# alias)
94+data Alias (alias :: Symbol) = Alias
95
95
96renderAlias :: KnownSymbol alias => Alias alias -> ByteString
96renderAlias :: KnownSymbol alias => Alias alias -> ByteString
97−renderAlias (Alias alias) = fromString (symbolVal' alias)
97+renderAlias = fromString . symbolVal
98
98
99instance alias1 ~ alias2 => IsLabel alias1 (Alias alias2) where
99instance alias1 ~ alias2 => IsLabel alias1 (Alias alias2) where
100 fromLabel = Alias
100 fromLabel = Alias
@@ -110,8 +110,8 @@ renderAliased
110 :: (forall ty. expression ty -> ByteString)
110 :: (forall ty. expression ty -> ByteString)
111 -> Aliased expression aliased
111 -> Aliased expression aliased
112 -> ByteString
112 -> ByteString
113−renderAliased render (expression `As` Alias alias) =
113+renderAliased render (expression `As` alias) =
114− render expression <> " AS " <> fromString (symbolVal' alias)
114+ render expression <> " AS " <> renderAlias alias
115
115
116data NullityType = Null PGType | NotNull PGType
116data NullityType = Null PGType | NotNull PGType
117
117
squeal-postgresql/src/Squeal/PostgreSQL/Statement.hs+4−3
@@ -73,7 +73,7 @@ instance {-# OVERLAPPABLE #-} (KnownSymbol column, HasColumn column table ty)
73
73
74instance (HasColumn column columns ty, tables ~ '[table ::: columns])
74instance (HasColumn column columns ty, tables ~ '[table ::: columns])
75 => IsLabel column (Expression params tables 'Ungrouped ty) where
75 => IsLabel column (Expression params tables 'Ungrouped ty) where
76− fromLabel = getColumn
76+ fromLabel = getColumn (proxy# @Symbol @column)
77
77
78instance (HasTable table tables columns, HasColumn column columns ty)
78instance (HasTable table tables columns, HasColumn column columns ty)
79 => IsTableColumn table column (Expression params tables 'Ungrouped ty) where
79 => IsTableColumn table column (Expression params tables 'Ungrouped ty) where
@@ -460,7 +460,8 @@ instance
460 , HasColumn column columns ty
460 , HasColumn column columns ty
461 , GroupedBy table column bys
461 , GroupedBy table column bys
462 ) => IsLabel column
462 ) => IsLabel column
463− (Expression params tables ('Grouped bys) ty) where fromLabel = getGroup1
463+ (Expression params tables ('Grouped bys) ty) where
464+ fromLabel = getGroup1 (proxy# @Symbol @column)
464
465
465instance
466instance
466 ( HasTable table tables columns
467 ( HasTable table tables columns
@@ -588,7 +589,7 @@ instance {-# OVERLAPPABLE #-}
588
589
589instance HasTable table schema columns
590instance HasTable table schema columns
590 => IsLabel table (Table schema columns) where
591 => IsLabel table (Table schema columns) where
591− fromLabel = getTable
592+ fromLabel = getTable (proxy# @Symbol @table)
592
593
593data TableReference params schema tables where
594data TableReference params schema tables where
594 Table
595 Table
stack.yaml+1−1
@@ -1,3 +1,3 @@
1−resolver: nightly-2017-06-26
1+resolver: nightly-2017-08-15
2packages:
2packages:
3- squeal-postgresql
3- squeal-postgresql