utdemir / hs-nix-template

A Haskell project template that uses Nix and comes with cabal-install, ghcid, ormolu, haskell-language-server and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Validate user input to avoid creating malformed files

utdemir opened this issue · comments

Currently most of the inputs we allow are raw strings. The user can easily pass incorrect values (project names with disallowed characters, module names that does not fit haskell syntax).

We should have a script which validates them to ensure that the files we generate are correct.

It doesn't have to be a super strict validation, I am happy if a dedicated user can break it; but we should at least protect for simple mistakes.