dependent-db's People
Forkers
kevinjcliaodependent-db's Issues
Can't build with GHC 8.2.1
I tried building dependent-db
with GHC 8.2.1 recently. I had to apply these trivial patches to Basics
to adapt to 8.2-specific changes:
diff --git a/Basics.hs b/Basics.hs
index 2b03e91..5172aa7 100644
--- a/Basics.hs
+++ b/Basics.hs
@@ -3,7 +3,7 @@
This module defines all the plumbing needed to power the dependent database.
-}
-{-# LANGUAGE TypeOperators, TypeFamilies, TypeApplications,
+{-# LANGUAGE CPP, TypeOperators, TypeFamilies, TypeApplications,
ExplicitForAll, ScopedTypeVariables, GADTs, TypeFamilyDependencies,
TypeInType, ConstraintKinds, UndecidableInstances,
FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies,
@@ -13,7 +13,7 @@
module Basics where
import Data.Type.Bool
-import Data.Type.Equality
+import Data.Type.Equality ((:~:)(..), TestEquality(..), type (==))
import GHC.TypeLits
import Data.Proxy
import GHC.Exts
@@ -73,6 +73,12 @@ Nil %:++ x = x
-- Type-indexed type representations
-- Based on "A reflection on types"
+#if __GLASGOW_HASKELL__ >= 802
+type LiftedRep = 'LiftedRep
+#else
+type LiftedRep = 'PtrRepLifted
+#endif
+
data TyCon (a :: k) where
Int :: TyCon Int
Bool :: TyCon Bool
@@ -82,7 +88,7 @@ data TyCon (a :: k) where
Arrow :: TyCon (->)
TYPE :: TyCon TYPE
RuntimeRep :: TyCon RuntimeRep
- PtrRepLifted' :: TyCon 'PtrRepLifted
+ PtrRepLifted' :: TyCon LiftedRep
-- If extending, add to eqTyCon too
eqTyCon :: TyCon a -> TyCon b -> Maybe (a :~~: b)
@@ -211,7 +217,7 @@ instance TyConAble [] where tyCon = List
instance TyConAble Maybe where tyCon = Maybe
instance TyConAble (->) where tyCon = Arrow
instance TyConAble TYPE where tyCon = TYPE
-instance TyConAble 'PtrRepLifted where tyCon = PtrRepLifted'
+instance TyConAble LiftedRep where tyCon = PtrRepLifted'
instance TyConAble RuntimeRep where tyCon = RuntimeRep
-- Can't just define Typeable the way we want, because the instances
But after this, I hit a larger roadblock:
$ /opt/ghc/8.2.1/bin/ghci Main.hs
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 6] Compiling Basics ( Basics.hs, interpreted )
[2 of 6] Compiling Instances ( Instances.hs, interpreted )
[3 of 6] Compiling DB2 ( DB2.hs, interpreted )
[4 of 6] Compiling ReadDB ( ReadDB.hs, interpreted )
[5 of 6] Compiling TH ( TH.hs, interpreted )
[6 of 6] Compiling Main ( Main.hs, interpreted )
Main.hs:20:10: error:
• Could not deduce: Disjoint s s1 ~ 'True
from the context: ReadSchema s1
bound by a type expected by the context:
ReadSchema s1 => IO ()
at Main.hs:20:10-58
or from: ReadSchema s
bound by a type expected by the context:
ReadSchema s => IO ()
at Main.hs:20:10-58
• In the second argument of ‘checkReadSchema’, namely
‘((readDB classes_sch) students_sch)’
In the second argument of ‘checkReadSchema’, namely
‘((checkReadSchema classes_sch)
((readDB classes_sch) students_sch))’
In the fourth argument of ‘checkInProxy’, namely
‘((checkReadSchema students_sch)
((checkReadSchema classes_sch)
((readDB classes_sch) students_sch)))’
• Relevant bindings include
students_sch :: Schema s1 (bound at Main.hs:19:40)
classes_sch :: Schema s (bound at Main.hs:18:40)
|
20 | $(checkSchema 'readDB ['classes_sch, 'students_sch])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Do you know what might be happening here?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.