jvranish / minikanrent Goto Github PK
View Code? Open in Web Editor NEWAn implementation of miniKanren in Haskell
License: MIT License
An implementation of miniKanren in Haskell
License: MIT License
Hi,
I'm interested in updating the code in MiniKanrenT in order to fix compiler errors (e.g. #1 and #2), and experimenting with it a bit. If all goes well with it, it'd be nice to have it on Hackage - would you be interested in my assisting with maintenance?
EDITED to add: Having investigated further, it might be better if I implement my own package.
jeff@jbb-lenovo:~/code/logic/MiniKanrenT$ stack init
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- MiniKanrenT.cabal
Selecting the best among 11 snapshots...
* Matches lts-9.14
Selected resolver: lts-9.14
Initialising configuration using resolver: lts-9.14
Total number of user packages considered: 1
Writing configuration to file: stack.yaml
All done.
jeff@jbb-lenovo:~/code/logic/MiniKanrenT$ stack ghci
MiniKanrenT-0.0.1: configure (lib)
Configuring MiniKanrenT-0.0.1...
MiniKanrenT-0.0.1: initial-build-steps (lib)
Configuring GHCi with the following packages: MiniKanrenT
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
[1 of 4] Compiling Control.Monad.LogicVarT ( /home/jeff/code/logic/MiniKanrenT/src/Control/Monad/LogicVarT.hs, interpreted )
/home/jeff/code/logic/MiniKanrenT/src/Control/Monad/LogicVarT.hs:57:55: error:
• Couldn't match representation of type ‘m (Maybe
(a, LogicVarT m a),
LVarData)’
with that of ‘m (Maybe (a, StateT LVarData m a), LVarData)’
arising from the coercion of the method ‘msplit’
from type ‘forall a.
StateT LVarData m a
-> StateT LVarData m (Maybe (a, StateT LVarData m a))’
to type ‘forall a.
LogicVarT m a -> LogicVarT m (Maybe (a, LogicVarT m a))’
NB: We cannot know what roles the parameters to ‘m’ have;
we must assume that the role is nominal
• When deriving the instance for (MonadLogic (LogicVarT m))
Failed, modules loaded: none.
MiniKanrenT is failing to compile with GHC 7.6.3. It requires RankNTypes
to be enabled while compiling Control/Monad/LogicVarT.hs
.
Adding RankNTypes
to LANGUAGE
pragma works.
diff --git a/src/Control/Monad/LogicVarT.hs b/src/Control/Monad/LogicVarT.hs
index 0d765aa..4a46675 100644
--- a/src/Control/Monad/LogicVarT.hs
+++ b/src/Control/Monad/LogicVarT.hs
@@ -1,5 +1,6 @@
{-#Language GeneralizedNewtypeDeriving
- , DeriveDataTypeable #-}
+ , DeriveDataTypeable
+ , RankNTypes #-}
module Control.Monad.LogicVarT
( LogicVarT
, LVar, lvarKey, lvarValue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.