goldfirere / glambda Goto Github PK
View Code? Open in Web Editor NEWThe home of the Glamorous Glambda interpreter
License: BSD 3-Clause "New" or "Revised" License
The home of the Glamorous Glambda interpreter
License: BSD 3-Clause "New" or "Revised" License
I remember attending this talk about a year ago, very cool! I'm currently trying to represent SQL expressions in Haskell and I have a hunch that GADT's could help. I'm trying to brush up on GADT's and I was wondering if the solutions to the exercises are available anywhere.
Thanks!
Val
from Exp.hs
is a lovely thing to mark injective (and it looks very nice with instance sigs)
{-# Language TypeFamilyDependencies #-}
{-# Language InstanceSigs #-}
class GlamVal t where
type Val t = res | res -> t
val :: Val t -> Exp '[] t
instance GlamVal Int where
type Val Int = Int
val :: Int -> Exp '[] Int
val = IntE
instance GlamVal Bool where
type Val Bool = Bool
val :: Bool -> Exp '[] Bool
val = BoolE
instance GlamVal (a -> b) where
type Val (a -> b) = Exp '[a] b
val :: Exp '[a] b -> Exp '[] (a -> b)
val = Lam
the val
instances become even more basic, it also removes clutter throughout other modules.
glambda-1.0.1
(the latest version on Hackage) no longer compiles after the release of either-5
:
$ cabal install glambda
Resolving dependencies...
Configuring glambda-1.0.1...
Building glambda-1.0.1...
Failed to install glambda-1.0.1
Build log ( /home/ryanglscott/.cabal/logs/ghc-8.2.2/glambda-1.0.1-KIdxe1fpIpCAdChAXWfgZ.log ):
cabal: Entering directory '/tmp/cabal-tmp-19074/glambda-1.0.1'
Configuring glambda-1.0.1...
Preprocessing library for glambda-1.0.1..
Building library for glambda-1.0.1..
[ 1 of 15] Compiling Language.Glambda.Util ( src/Language/Glambda/Util.hs, dist/build/Language/Glambda/Util.o )
[ 2 of 15] Compiling Language.Glambda.Type ( src/Language/Glambda/Type.hs, dist/build/Language/Glambda/Type.o )
[ 3 of 15] Compiling Language.Glambda.Token ( src/Language/Glambda/Token.hs, dist/build/Language/Glambda/Token.o )
[ 4 of 15] Compiling Language.Glambda.Pretty ( src/Language/Glambda/Pretty.hs, dist/build/Language/Glambda/Pretty.o )
[ 5 of 15] Compiling Language.Glambda.Unchecked ( src/Language/Glambda/Unchecked.hs, dist/build/Language/Glambda/Unchecked.o )
[ 6 of 15] Compiling Language.Glambda.Statement ( src/Language/Glambda/Statement.hs, dist/build/Language/Glambda/Statement.o )
[ 7 of 15] Compiling Language.Glambda.Exp ( src/Language/Glambda/Exp.hs, dist/build/Language/Glambda/Exp.o )
[ 8 of 15] Compiling Language.Glambda.Shift ( src/Language/Glambda/Shift.hs, dist/build/Language/Glambda/Shift.o )
[ 9 of 15] Compiling Language.Glambda.Globals ( src/Language/Glambda/Globals.hs, dist/build/Language/Glambda/Globals.o )
[10 of 15] Compiling Language.Glambda.Monad ( src/Language/Glambda/Monad.hs, dist/build/Language/Glambda/Monad.o )
src/Language/Glambda/Monad.hs:37:1: error:
Could not find module ‘Control.Monad.Trans.Either’
Perhaps you meant
Control.Monad.Trans.Writer (from transformers-0.5.2.0)
Control.Monad.Trans.Error (from transformers-0.5.2.0)
Control.Monad.Trans.Reader (from transformers-0.5.2.0)
Use -v to see a list of the files searched for.
|
37 | import Control.Monad.Trans.Either
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '/tmp/cabal-tmp-19074/glambda-1.0.1'
cabal: Error: some packages failed to install:
glambda-1.0.1-KIdxe1fpIpCAdChAXWfgZ failed during the building phase. The
exception was:
ExitFailure 1
This is because either-5
removed Control.Monad.Trans.Either
in favor of Control.Monad.Trans.Except
from transformers
.
It looks like glambda
HEAD has already accommodated this change in 6cb06f6, but this hasn't made it to Hackage yet. Can you upload a new version to fix this?
After updating NixOS to errors 2.x, we can no longer built your package: http://packdeps.haskellers.com/feed?needle=glambda,
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.