Giter Site home page Giter Site logo

forml's People

Contributors

brow avatar jhawk avatar mightybyte avatar s11001001 avatar taku0 avatar texodus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forml's Issues

Parameterized modules

  • Allow modules to be declared within functions, via ModuleExpression
  • Add sugar; TBD

Rebrand to `Forml`

This is clever, easily googl-able and would fit well on a sticker or t-shirt. For people who typically wear ML-branded clothing, that is.

Embed the prelude

  • Embed via TH
  • Add CLI options to disable prelude in output
  • Fix docs & tests tasks to exclude prelude

Build process overly complicated

Note that Forml also requires Closure for optimizations and either Phantom.js or Node.js

Install the Haskell Platform, then...

Please write Forml in ONE language, either ANSI C.

nested modules don't alias correctly

test case :

189 module "Test that nested modules alias correctly"
190
191 open prelude
192
193 module welcome
194 module to
195 module costco
196 greeting = "I love you"
197
198 open welcome.to.costco as idiocracy
199
200 idiocracy.greeting is "I love you"

result :

Test failed at line null

undefined

Expected undefined
Actual   undefined

[X] Testing tests.js [Phantom.js]

Tetris example doesn't compile

$ cd src/forml
$ forml tetris.forml
[*] Loading prelude.forml
[X] Loading tetris.forml

Types do not unify: found Array Array Num, expecting Piece

Types do not unify: found Array Array Num, expecting Piece
  at line 211, column 21

Types do not unify: found Array Array Num, expecting Piece
  at line 249, column 19

Types do not unify: found Array Array Num, expecting Piece
  at line 287, column 21

Types do not unify: found Array Array Num, expecting Piece
  at line 348, column 25


11 additional errors

New Hackage Release

The existing 0.2 on hackage doesn't build for me, but the latest from github does. Might be nice to do a new hackage release.

Installing forml from hackage fails

~ $ cabal install forml
Resolving dependencies...
Configuring forml-0.1.1...
Building forml-0.1.1...
Preprocessing executable 'forml' for forml-0.1.1...
[ 1 of 24] Compiling Forml.Parser.Utils ( src/hs/Forml/Parser/Utils.hs, dist/build/forml/forml-tmp/Forml/Parser/Utils.o )

src/hs/Forml/Parser/Utils.hs:31:1:
    Warning: The import of `Text.Parsec.Prim' is redundant
               except perhaps to import instances from `Text.Parsec.Prim'
             To import instances alone, use: import Text.Parsec.Prim()

src/hs/Forml/Parser/Utils.hs:196:1:
    Warning: Top-level binding with no type signature:
               optional_sep :: ParsecT T.Text () (StateT SourcePos Identity) ()

src/hs/Forml/Parser/Utils.hs:203:1:
    Warning: Top-level binding with no type signature:
               withPosTemp :: forall b s u (m :: * -> *) a.
                              (Show a, MonadState a m) =>
                              ParsecT s u m b -> ParsecT s u m b
[ 2 of 24] Compiling Forml.Types.TypeDefinition ( src/hs/Forml/Types/TypeDefinition.hs, dist/build/forml/forml-tmp/Forml/Types/TypeDefinition.o )
[ 3 of 24] Compiling Forml.Types.Symbol ( src/hs/Forml/Types/Symbol.hs, dist/build/forml/forml-tmp/Forml/Types/Symbol.o )
[ 4 of 24] Compiling Forml.Types.Type ( src/hs/Forml/Types/Type.hs, dist/build/forml/forml-tmp/Forml/Types/Type.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.

... lots more packages loaded, then:

[ 5 of 24] Compiling Forml.Static     ( src/hs/Forml/Static.hs, dist/build/forml/forml-tmp/Forml/Static.o )

src/hs/Forml/Static.hs:53:39:
    Exception when trying to run compile-time code:
      src/html/styles.css: openBinaryFile: does not exist (No such file or directory)
      Code: embedFile "src/html/styles.css"
    In the first argument of `B.toString', namely
      `$(embedFile "src/html/styles.css")'
    In the second argument of `mappend', namely
      `B.toString ($(embedFile "src/html/styles.css"))'
    In the first argument of `mappend', namely
      `B.toString ($(embedFile "lib/js/jasmine-1.0.1/jasmine.css"))
       `mappend` B.toString ($(embedFile "src/html/styles.css"))'
cabal: Error: some packages failed to install:
forml-0.1.1 failed during the building phase. The exception was:
ExitFailure 1

By contrast, the following works fine:

$ git checkout -q 37bce8c
$ cabal configure; cabal install

A -help / -h flag would be helpful

As a developer
When I type forml -h or -help
I expect a list of flags with descriptions
So, I don't have to look at the CLI.hs file to see what flags are available
And other practical reasons...

Error and garbled output when compiling with -node-test

$ cd src/forml
$ forml -node-test readme.forml
[*] Loading prelude.forml
[*] Loading readme.forml
[*] Closure readme.js  remote][remote]
[-] Closure [tests]
[*] Docs
                        ode.js]
Test failed at line 372

undefined

    Expected true
    Actual   {"error":{}}

Test failed at line 577

undefined

    Expected undefined
    Actual   undefined


[stdin]:98
})}}};this.split=b;var u=0,h={reportRunnerResults:function(){return phantom.ex
                                                                    ^
ReferenceError: phantom is not defined
    at Object.reportRunnerResults ([stdin]:98:321)
    at [object Object].reportRunnerResults ([stdin]:41:317)
    at [object Object].finishCallback ([stdin]:52:267)
    at [object Object].onComplete ([stdin]:51:492)
    at [object Object].next_ ([stdin]:51:19)
    at [stdin]:50:439
    at [object Object].finish ([stdin]:64:269)
    at [object Object].onComplete ([stdin]:65:466)
    at [object Object].next_ ([stdin]:51:19)
    at [stdin]:50:439
[X] Testing readme.js [Node.js]

Prelude should be implicit

Defining a new module should implicitly import the symbols defined in prelude, as the language is effectively useless without it.

This should be blocked on #10 to prevent inflating the target. Once this is done though, we can also integrate the individual closure calls, which will speed up multi-file compiles a good deal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.