Git Product home page Git Product logo

fpalgo's Introduction

Haskell のメモ

Build Status Coverage Status

Tips

  • test は HSpec と doctest を使うと良い。
    • coverage 計測には hpc を使うと良い
    • hpc-coverallsghc-7.6 では install に失敗した
  • doctest は ghci みたいな IO っぽいので大体の副作用を使える
  • doctest で副作用のある値を使うときは Applicative に書くほうがわかりやすい ?
  • Emacs の haskell-mode + ghc-mod で C-u C-c C-t をすると推論された型をコードに挿入
  • where スコープではなくグローバルでも後方参照できた
  • 型クラスの制約を使った多相型シノニノムはないっぽい, newtype を使う
    • newtype Num a => NList a = List a C++ の typedef くらい読みにくい
    • newtypetype 同様にオーバーヘッドは無い,ただしコンストラクタとフィールドも一つだけ作れるし deriving も可能
    • data は何個でも作れるが呼び出しでオーバーヘッドがある

TODO

  • 複数ソースのライブラリをビルド
  • HSpec で副作用のあるコードのテスト
  • Emacs の設定が肥大化したのでコンパクトに
  • Criterion で benchmark
  • モナド変換子って何
  • ghc-mod にテストコード (spec など) を読み込ませる方法
  • Windows の ghc-mod がフリーズする
  • Windows の ghc-mod や flycheck がエラーを表示しない
    • 最新版を再インストールする (hdev-tools は動かなくなっていた)
  • 自前の型に Arbitary を書く
  • hpc-coverallstest ディレクトリを計測対象から外す

fpalgo's People

Contributors

shigekikarita avatar

Watchers

James Cloos avatar  avatar  avatar

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.