Git Product home page Git Product logo

hlint-lib's Introduction

hlint-lib

Build Status

Configuration for hlint, as a Dhall library.

Use

As an example:

let hlint = ./constructors.dhall

let recursion = ./recursion.dhall

let fixity = ./fixity.dhall

let base = ./base.dhall

let bannedFunctions =
      [ hlint.functions { functions = [ hlint.globalBan "fromJust" ] } ]

in  fixity.defFixities # bannedFunctions # recursion # base

Save this as hlint.dhall, run dhall-to-yaml --file hlint.dhall and you should get

- fixity: "infixr 3 ***"
- fixity: "infixr 3 &&&"
- fixity: "infixr 2 +++"
- fixity: "infixr 2 |||"
- fixity: "infixr 1 <=<"
- fixity: "infixl 4 <$"
- fixity: "infixl 4 $>"
- fixity: "infixl 1 <&>"
- fixity: "infixl 4 *>"
- fixity: "infixl 4 <*"
- fixity: "infixl 3 <|>"
- fixity: "infixl 4 <**>"
- functions:
    - name: fromJust
      within: []
- error:
    lhs: "hylo embed"
    name: "Use ananorphism"
    rhs: ana
- error:
    lhs: "hylo f project"
    name: "Use catamorphism"
    rhs: "cata f"
- error:
    lhs: "hyloM (pure . embed)"
    name: "Use monadic anamorphism"
    rhs: anaM
- error:
    lhs: "hyloM f (pure . project)"
    name: "Use monadic catamorphism"
    rhs: "cataM f"
- error:
    lhs: "fmap (const x)"
    rhs: "(x <$)"
- error:
    lhs: "fmap (const ())"
    name: "Use void"
    rhs: void
- error:
    lhs: "fromMaybe []"
    name: Use concat
    rhs: concat

...containing prepackaged hints for working with recursion schemes as well as fixity declarations for various operators in base.

Contents

Lovingly provided by polyglot:

───────────────────────────────────────────────────────────────────────────────
 Language             Files       Lines         Code     Comments       Blanks
───────────────────────────────────────────────────────────────────────────────
 Dhall                    7         141          117            0           24
 Makefile                 1           9            6            0            3
 Markdown                 2          90           73            0           17
 YAML                     1          26           24            0            2
───────────────────────────────────────────────────────────────────────────────
 Total                   11         266          220            0           46
───────────────────────────────────────────────────────────────────────────────

hlint-lib's People

Contributors

vmchale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

sambacha

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.