augustss / microhs Goto Github PK
View Code? Open in Web Editor NEWHaskell implemented with combinators
License: Other
Haskell implemented with combinators
License: Other
Building executables with mhs
is failing for me because it is not including the md5.c
source when compiling. I needed to make this change to get it to work:
diff --git a/src/MicroHs/Main.hs b/src/MicroHs/Main.hs
index e3ff1e4..6749392 100644
--- a/src/MicroHs/Main.hs
+++ b/src/MicroHs/Main.hs
@@ -118,7 +118,7 @@ mainCompile mhsdir flags mn = do
hClose h
ct1 <- getTimeMilli
mcc <- lookupEnv "MHSCC"
- let cc = fromMaybe ("cc -w -Wall -O3 " ++ mhsdir ++ "/src/runtime/eval.c $IN -lm -o $OUT") mcc
+ let cc = fromMaybe ("cc -w -Wall -O3 " ++ mhsdir ++ "/src/runtime/eval.c " ++ mhsdir ++ "/src/runtime/md5.c $IN -lm -o $OUT") mcc
cmd = substString "$IN" fn $ substString "$OUT" outFile cc
when (verbose flags > 0) $
putStrLn $ "Execute: " ++ show cmd
If records are not supported, I think that would be worth mentioning in the README.
This is what I tried:
module Record (R(..)) where
data R = R1 { r1Field :: () }
The error is
mhs: "./Record.hs": line 3, col 13:
found: {
expected: LQIdent ( UQIdent [ literal :: => ! | deriving ; }
MicroHs, version 0.8.1.0, combinator file version v5.1
I have only tried on Fedora Linux Rawhide so far, but this might affect other Linux distros too?
Maybe I should re-bootstrap?
$ mhs
Welcome to interactive MicroHs!
loaded Data.Bool_Type
loaded Data.Ordering_Type
loaded Primitives
loaded Data.Function
loaded Data.Functor
loaded Control.Applicative
loaded Data.List_Type
loaded Data.Char_Type
loaded Control.Error
loaded Data.Bounded
loaded Data.Eq
loaded Text.Show
loaded Data.Bool
loaded Control.Monad
loaded Data.Integer_Type
loaded Data.Num
loaded Data.Ord
loaded Data.Integral
loaded Data.Ratio_Type
loaded Data.Real
loaded Data.Int
loaded Data.Char
loaded Data.Maybe_Type
loaded Data.Tuple
loaded Data.List
loaded Data.Maybe
loaded Data.Bits
loaded Data.Fractional
loaded Data.Floating
loaded Data.Enum
loaded Data.Integer
loaded Data.Ratio
loaded Data.RealFloat
loaded Data.Word
loaded Data.Double
loaded Data.Either
loaded Foreign.Marshal.Alloc
loaded Foreign.C.String
loaded Foreign.Ptr
loaded System.IO
loaded Text.String
loaded Prelude
Type ':quit' to quit, ':help' for help
> mhs: getRaw failed
readline: warning: turning off output flushing
$
This also leaves the terminal in a bad state (eg Backspace no longer works): reset helps a little.
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.