Comments (22)
fromList
のドキュメントに注意書きがあるけど、そもそも version を Pattern に混ぜんなよという感がする。
from hexirp-hakyll.
躊躇なく新しい設計を組み立てようとする。具体的には Pattern
を Identifier -> Bool
の newtype にする。ここで問題になるのは Pattern が Binary である必要があるのかどうか。
from hexirp-hakyll.
jaspervdj/hakyll@d2aaf33 と jaspervdj/hakyll@86ede74 が関わっているみたい?
from hexirp-hakyll.
Dependencies を扱うために必要なそうで。具体的には https://github.com/Hexirp/hexirp-hakyll/blob/a1dd75a18c5b3a55c2684326d93896c4c1e1d672/hexyll-core/src/Hexyll/Core/Dependencies.hs の所。
from hexirp-hakyll.
hexirp-hakyll/hexyll-core/src/Hexyll/Core/Dependencies.hs
Lines 78 to 81 in a1dd75a
あっ。
from hexirp-hakyll.
対策するためには、別々の型にするとかかな?
from hexirp-hakyll.
regex-applicative を使うのはやめておこう。 Eq でも Show でもなくなるから。
from hexirp-hakyll.
あー、でも、直接 Pattern に変換すればいいのか?
from hexirp-hakyll.
まあ、ここがあかんのだよね。
from hexirp-hakyll.
ここもあかん。
その原因は
from hexirp-hakyll.
なんで普通に列挙しないでパターンも許しているの?
from hexirp-hakyll.
OldPattern の中で代替できなさそうなのは capture 関連か。ここの意味がよくわからない。
from hexirp-hakyll.
「型を合わせる」とは coerce で済む作業である。
from hexirp-hakyll.
capture は使われていないので消す。
from hexirp-hakyll.
capture はこんな感じのようだ。つまりワイルドカードにマッチした箇所をリストにして返す。マッチしなかったら Nothing
になる。
hexirp-hakyll/hexyll-core/unit-test/Hexyll/Core/IdentifierTest.hs
Lines 27 to 48 in a33414b
そして fromCapture は *
とか **
の穴を与えられた値で埋めていく。
hexirp-hakyll/hexyll-core/src/Hexyll/Core/Identifier/Pattern.hs
Lines 300 to 306 in a33414b
from hexirp-hakyll.
てゆーか、これ regex-applicative を使えば行ける話じゃん。
from hexirp-hakyll.
PatternData と Pattern の Monoid 構造は compile により準同型になっている。
from hexirp-hakyll.
ドキュメントを追加したけど、なんか見づらいような気がする。
from hexirp-hakyll.
こことか
hexirp-hakyll/hexyll-core/src/Hexyll/Core/Rules.hs
Lines 132 to 136 in f53a6e4
ここで
hexirp-hakyll/hexyll-core/src/Hexyll/Core/Routes.hs
Lines 128 to 135 in f53a6e4
古い Pattern が使われている。
from hexirp-hakyll.
うーん、 (.||.)
とかは Regex
とかでできるから捨てちゃう?
from hexirp-hakyll.
そもそも現実的には Glob
しか使わない?
from hexirp-hakyll.
なぜ Old.Pattern
は Binary
のインスタンスを持っていなければならないのか?
from hexirp-hakyll.
Related Issues (20)
- error $ unlines [ ... ] イディオムをやめる HOT 1
- Binary のインスタンスの修正
- BinaryTime に関するものを整備する
- Hexyll.Core.Routes を書き直しする HOT 8
- Identifier を Resource に依存させる HOT 2
- PatternExpr と Pattern のインターフェースを共通化する HOT 1
- Hexyll.Core.Identifier をリファクタリングする HOT 3
- Hexyll.Core.Dependencies に Internal を使わない
- Resourcre を一つのモジュールとする
- Provider は Store に依存するべきか? HOT 1
- Universe を H.C.Metadata から独立させる
- Hexyll.Core.Item を書き直す HOT 2
- HasConfiguration 型クラスを追加する
- コピーライトの年を合わせる
- Hexyll.Core.Compiler.Internal をリファクタリングする
- Hexyll.Core.Compiler.Internal を整える HOT 1
- ask と view を合成した関数を実装する
- Hexyll.Core.Writable をリファクタリングする。 HOT 1
- Hexyll.Core.Log をリファクタリングする HOT 3
- Writable を使わない HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexirp-hakyll.