From 56273cf3b371312f0e72fc2af95a9dcacc8228b8 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Wed, 23 Jul 2025 12:05:08 +0200 Subject: Slaying --- app/Data/Iban.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/Data/Iban.hs') diff --git a/app/Data/Iban.hs b/app/Data/Iban.hs index 412577a..d9566b9 100644 --- a/app/Data/Iban.hs +++ b/app/Data/Iban.hs @@ -1,4 +1,4 @@ -module Data.Iban (Iban, mkIban) where +module Data.Iban (Iban, mkIban, toText) where import Control.Applicative ((<|>)) import Data.Attoparsec.Text as AP @@ -43,3 +43,6 @@ validateIban = AP.parseOnly $ do charsToInteger chars * 1000000 + charsToInteger countryCode * 100 + charsToInteger checkDigits valid countryCode checkDigits chars = ibanToInteger countryCode checkDigits chars `mod` 97 == 1 + +toText :: Iban -> T.Text +toText (Iban t) = t -- cgit v1.2.3