Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Commit

Permalink
feat(client): updated the client to use the new Mu wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
prescientmoon committed Oct 20, 2020
1 parent 9e2dc9a commit 0aa7dde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/client/src/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ import Lunarflow.Geometry.Foreign (Geometry, fromShape, renderGeometry)
import Lunarflow.Layout (addIndices, fromScoped, runLayoutM)
import Lunarflow.Parser (unsafeParseLambdaCalculus)
import Lunarflow.Renderer.WithHeight (withHeights)
import Lunarflow.Debug (debugSpy)
import Partial.Unsafe (unsafePartial)

geometry :: Geometry
geometry =
fromShape $ runRenderM
$ render
$ debugSpy
$ fst
$ withHeights
$ unsafePartial
$ fromJust
-- TODO: fix bug with application creating a line in the same place as the lambda used as argument.

$ flip List.index 1
$ flip List.index 0
$ List.catMaybes
$ map fromScoped
$ runLayoutM
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/Renderer/WithHeight.purs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Data.Array (foldr)
import Data.Array as Array
import Data.Bifunctor (lmap)
import Data.Foldable (sum)
import Data.Functor.Mu (Mu)
import Lunarflow.Mu (Mu)
import Data.List (List, length) as List
import Data.Map as Map
import Data.Tuple (Tuple(..), snd, uncurry)
Expand Down

0 comments on commit 0aa7dde

Please sign in to comment.