This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- | | |
DESCRIPTION | |
This program parses valid NRICs from text. | |
NRICs are unique identification numbers given to Singaporeans and Permanent residents of Singapore. | |
SYSTEM | |
This runs on GHC 8.10.1 | |
These libraries should be included with your GHC distribution: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from @ryanorendorff's gist: https://gist.github.com/ryanorendorff/f5c96d9f363a0e390425c2d9588bbb9d | |
{ pkgs ? import <nixos> {} }: | |
let | |
# The standard library in nixpkgs does not come with a *.agda-lib file, so we | |
# generate it here. | |
standard-library-agda-lib = pkgs.writeText "standard-library.agda-lib" '' | |
name: standard-library | |
include: ${pkgs.AgdaStdlib}/share/agda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- stack --system-ghc runghc | |
{- | | |
Result of pair programming with [bumbleblym](https://github.com/bumbleblym) | |
He implemented most of the code below and suggested using parsers from base | |
rather than @getLine@ & @read@ to parse the input. | |
This increases code modularity and ease of refactoring. | |
Interesting parts: |
NewerOlder